Displaying 5 results from an estimated 5 matches for "irreversiblemigration".
2006 Apr 06
3
Irreversible Migrations
Hi,
To make a migration irreversable, one has to execute "raise
IrreversibleMigration". This is how it''s documented everywhere. However,
when I do that, I get this:
rake aborted!
uninitialized constant IrreversibleMigration
This is the migration (the file is called 022_ldap_fix.rb):
class LdapFix < ActiveRecord::Migration
def self.up
execute File.open( __FI...
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
2006 Jul 15
6
Subversion and migrations confusion
I''ve spent the last several months learning RoR and building my first app. I''ve not used migrations yet and honestly don''t understand them much, and have not had my app under version control. I''ve decided it''s time (I know, some will say way past time ;-) ) to put the app under version control. I''ll be using Subversion and have begun working
2011 Aug 19
0
Rails 3.1 reversible migrations and change_table
...lly supposed to be irreversible?
class AddColumnsToUsers < ActiveRecord::Migration
def change
change_table :users do |t|
t.integer :foo
t.integer :bar
end
end
end
I''m using Rails 3.1 RC6 and when trying to redo this migration I''m
getting ActiveRecord::IrreversibleMigration error.
Cheers,
Szymon
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/K7GD-bNoqqoJ.
To post to this group, send email to rubyonrails-tal...
2007 Dec 21
0
db:migrate problem
...dex :people, :login
add_index :people, :email
add_index :people, :openid_url
end
...
end
004_drop_login_name:
class DropLoginName < ActiveRecord::Migration
def self.up
remove_index :people, :login
remove_column :people, :login
end
def self.down
raise ActiveRecord::IrreversibleMigration.new("can''t recover deleted
login names")
end
end
For some reason the cc app seems to be trying to run the migrations twice.
Any thoughts?
thanks in advance,
Gaius
--
View this message in context: http://www.nabble.com/db%3Amigrate-problem-tp14370093p14370093.html
Sent from...