Displaying 20 results from an estimated 9000 matches similar to: "How to do a rollback"
2006 Aug 16
14
Migrations: only one table per migration file?
Hi all
I have a new migration file created that adds some tables and fills one
with some data:
create_table :sound_styles do |t|
t.column :name, :string, :null => false
end
create_table :show_types do |t|
t.column :name, :string, :null => false
end
create_table :countries do |t|
t.column :name, :string, :null => false
end
ActionView::Helpers::FormOptionsHelper::COUNTRIES.each
2006 Mar 01
5
single transaction migrations
Hi!
It seems that migration doesn''t use single transcation to execute the
needed migrations for the database upgrade, so if I have database at
version 5, and I wrote some migrations 6..10, and error occurs while
executing migration 7, the database stays in state 6?
I also think that migration taks could use some more verbosity, for
example if migration fails, there''s no
2007 Apr 08
8
SQLite3 build is broken because calling rollback!() doesn't prevent COMMIT
I know why SQLite3 is broken. This code:
Topic.transaction do |transaction|
transaction.rollback!
end
results in the following database commands:
BEGIN;
ROLLBACK;
COMMIT;
In other words, there is a COMMIT when no transaction is in flight.
MySQL and Postgres are coll with it, but SQLite3 blows up with
indignation.
Recorded as a ticket: http://dev.rubyonrails.org/ticket/8030
2006 Jan 06
4
Are migrations executed within a transaction?
Hi all,
Can I safely assume that each migration is excuted within a
transaction, so that''s it''s safe to have migrations executing failing
statements?
Thanks,
- Rowan
--
Morality is usually taught by the immoral.
2007 Sep 07
3
Fails to restart mongrel cluster after Capistrano rollback (PIDs not deleted)
Hi,
I am deploying a Rails website using Capistrano to a VPS running the
site through Apache and Mongrel.
''cap deploy'' works fine, and mongrels are restarted. When I execute
''cap deploy:rollback'', however, my script fails to restart the
mongrels giving this error:
!!! PID file tmp/pids/mongrel.5000.pid already exists. Mongrel could
be running already.
2011 May 08
1
Transaction - but no rollback?
Hello,
I''m having trouble with transactions with rails 3.0.3 and mysql 5. I''d
like to import data etl-batch-style:
class Job < ActiveRecord::Base
# ...
def perform_etl
connection.transaction do
extract # some connection.execute / job.update_attribute stuff
transform # some connection.execute / job.update_attribute stuff
end
end
#...
end
2010 Jul 23
7
fail rollback transaction with manual raise exception
With :
PostgreSQL 8.4 or postgresql-8.3
rails 2.3.4
pg 9.x or pg 8.x
I test this code:
=========================
class NkiBatch < ActiveRecord::Base
Bank.connection.transaction do
bank = Bank.new(:name => "ddsjdsjdsjk")
bank.save!
raise ActiveRecord::Rollback.new
end
end
and this:
=========================
class NkiBatch < ActiveRecord::Base
2007 Dec 11
3
Transactional/Rollback problems
I''m having a rollback problem with rspec trunk. It doesn''t seem like
rollbacks are happening quite as often as they should be. It
appears as though the rollbacks are *NOT* occurring on the first
description block in a file, but are for the rest. Here is a set of
specs that are failing:
require File.dirname(__FILE__) + "/../spec_helper"
describe
2005 Dec 29
1
Table Generator wiki page broken.
Hi, all.
Table Generator wiki page is replaced a Chinese ad.
url at: http://wiki.rubyonrails.com/rails/pages/Table+Generator
any body can restore it ? Thanks very much.
a screenshot taken at:
http://homepage.mac.com/xuqingkuang/show/wiki.rubyonrails.com-rails-
pages-Table+Generator.png
---------------------------------------------------
Xuqing
2013 Jun 20
2
[PATCH V2] ocfs2: need rollback when journal_access failed in ocfs2_orphan_add()
While adding a file into orphan dir in ocfs2_orphan_add(),
it calls __ocfs2_add_entry() before ocfs2_journal_access_di().
If ocfs2_journal_access_di() failed, the file is added into
orphan dir, and orphan dir dinode updated, but file dinode
has not been updated.
Accordingly, the data is not consistent between file dinode
and orphan dir.
So, need to call ocfs2_journal_access_di() before
2012 Jun 22
1
'yum update' rollback or .. ?
Hello,
we have several physical servers (CentOS 5.*) with rather critical applications where (because of stability)
we don't do regularly 'yum update'. In virtualized environemnts (under Vmware)
we do a snapshot, then 'yum update', reboot and if something is wrong we rollback the snapshot.
On physical servers we cannot do that. I have read about rollback option of rpm but not
2012 Aug 15
2
how best to rollback from a yum update?
Suppose I want to upgrade a bunch of packages on a system, but in case the upgrade produces unexpected, undesired results, I want to be able to rollback the system to its original state. What is the best way to do that?
Often, I won't have, or be able to find, packages for the current installed versions. I.e. If I haven't upgraded postgres for 2 years, it may be that I can no longer
2006 Oct 20
2
how do you manually cause a rollback in a transaction?
how do you manually cause a rollback in a transaction?
I''ve looked everywhere with no suceess. Anyone know?
Thanks in advance
Chris
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2017 Sep 19
1
Re: Rollback to running VM
2012 Jan 11
1
How many "rollback" TXGs in a ring for 4k drives?
Hello all, I found this dialog on the zfs-devel at zfsonlinux.org list,
and I''d like someone to confirm-or-reject the discussed statement.
Paraphrasing in my words and understanding:
"Labels, including Uberblock rings, are fixed 256KB in size each,
of which 128KB is the UB ring. Normally there is 1KB of data in
one UB, which gives 128 TXGs to rollback to. When ashift=12 is
2005 Mar 31
4
Transactions
I cant seem to find much information apart from the basics on
transactions in rails. I have 5 nested transactions, and am performing
the following basic operations:
@whatever1.transaction do
@whatever2.transaction do
....
@whatever2.something = "foo"
@whatever1.something = "bar"
@whatever1.save
@whatever2.save
.....
end
end
((( I had tried using
2009 Dec 11
7
Doing ZFS rollback with preserving later created clones/snapshot?
Hi.
Is it possible on Solaris 10 5/09, to rollback to a ZFS snapshot,
WITHOUT destroying later created clones or snapshots?
Example:
--($ ~)-- sudo zfs snapshot rpool/ROOT at 01
--($ ~)-- sudo zfs snapshot rpool/ROOT at 02
--($ ~)-- sudo zfs clone rpool/ROOT at 02 rpool/ROOT-02
--($ ~)-- LC_ALL=C sudo zfs rollback rpool/ROOT at 01
cannot rollback to ''rpool/ROOT at 01'': more
2007 Oct 19
2
Using raid 1 for rollback purposes
Hi All,
For quite some time I've used raid 1 as a means of providing a
rollback mechanism for an upgrade (which I learned from others long
ago). So essentially, before an upgrade you split the mirrors and
upgrade one side or the other. If your upgrade goes well you sync one
way, if your upgrade does not you sync the other (much hand waving and
chanting going on, as its more complicated than
2017 Sep 19
2
Re: Rollback to running VM
2006 Oct 03
2
Rails transactions issue with rollback.
Hi,
I have a transaction in which a duplicate key exception is being thrown
by MySQL. I assume this happens when I try to do a save. The problem
is that before the save, I do a destroy on another object as part of the
transaction. Catching the exception by doing this,
User.transaction do
begin
objA.destroy
objB.save <-- causing exception
rescue Exception => exc