aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/migrations
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2011-12-09 01:49:08 +0100
committerPiotr Sarnacki <drogus@gmail.com>2011-12-09 01:54:20 +0100
commit62d556424adcbf473ec5fe2ed9b460c058a36463 (patch)
tree681e6a6f447c798abadcc51933120ad8271f3e9b /activerecord/test/migrations
parent652db2fc3e1d62737e4bedb3b7cee313d7400c0a (diff)
downloadrails-62d556424adcbf473ec5fe2ed9b460c058a36463.tar.gz
rails-62d556424adcbf473ec5fe2ed9b460c058a36463.tar.bz2
rails-62d556424adcbf473ec5fe2ed9b460c058a36463.zip
Ignore origin comment when checking for duplicates on Migration.copy
49ebe51 fixed copying migrations, but existing migrations would still trigger warnings. The proper way to compare migrations is to ignore origin lines - if migration is identical it means that we can silently skip it, regardless where it comes from.
Diffstat (limited to 'activerecord/test/migrations')
-rw-r--r--activerecord/test/migrations/to_copy_with_name_collision/1_people_have_hobbies.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/migrations/to_copy_with_name_collision/1_people_have_hobbies.rb b/activerecord/test/migrations/to_copy_with_name_collision/1_people_have_hobbies.rb
new file mode 100644
index 0000000000..e438cf5999
--- /dev/null
+++ b/activerecord/test/migrations/to_copy_with_name_collision/1_people_have_hobbies.rb
@@ -0,0 +1,9 @@
+class PeopleHaveLastNames < ActiveRecord::Migration
+ def self.up
+ add_column "people", "hobbies", :string
+ end
+
+ def self.down
+ remove_column "people", "hobbies"
+ end
+end