aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
diff options
context:
space:
mode:
authorJosh Susser <josh@hasmanythrough.com>2010-03-20 18:26:12 -0700
committerJosh Susser <josh@hasmanythrough.com>2010-12-01 10:57:38 -0800
commit7139aa878ceea8dd17a60955cd4d07f5f68980d9 (patch)
tree6246048e1a611d770a3f5b5b0208c6597cbd646a /activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
parent4e4e9ad48a222ac94a904c62ae684c609bd8e177 (diff)
downloadrails-7139aa878ceea8dd17a60955cd4d07f5f68980d9.tar.gz
rails-7139aa878ceea8dd17a60955cd4d07f5f68980d9.tar.bz2
rails-7139aa878ceea8dd17a60955cd4d07f5f68980d9.zip
name in schema_migrations, migrations in schema dump
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index 730b1c7425..ccb6fe3be2 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -429,9 +429,13 @@ module ActiveRecord
update "UPDATE #{quote_table_name(sm_table)} SET migrated_at = '#{quoted_date(Time.now)}' WHERE migrated_at IS NULL"
change_column sm_table, :migrated_at, :datetime, :null => false
end
+ unless cols.include?("name")
+ add_column sm_table, :name, :string, :null => false, :default => ""
+ end
else
create_table(sm_table, :id => false) do |schema_migrations_table|
schema_migrations_table.column :version, :string, :null => false
+ schema_migrations_table.column :name, :string, :null => false, :default => ""
schema_migrations_table.column :migrated_at, :datetime, :null => false
end
add_index sm_table, :version, :unique => true,