aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/migrations/valid_with_timestamps/20100201010101_we_need_reminders.rb
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-07-26 14:06:14 +0200
committerPiotr Sarnacki <drogus@gmail.com>2010-09-03 22:59:09 +0200
commit75f8ac6ea71e4b2337f870b91ac05df98f33a8d2 (patch)
treeb3fe95ec53958ce38a2b5fe23e7878dafd675b92 /activerecord/test/migrations/valid_with_timestamps/20100201010101_we_need_reminders.rb
parent2068b8cb6a8508fae9cd1a7f57e68d938c6403e6 (diff)
downloadrails-75f8ac6ea71e4b2337f870b91ac05df98f33a8d2.tar.gz
rails-75f8ac6ea71e4b2337f870b91ac05df98f33a8d2.tar.bz2
rails-75f8ac6ea71e4b2337f870b91ac05df98f33a8d2.zip
Implemented ActiveRecord::Migrations#copy based on James Adam's idea
ActiveRecord::Migration#copy allows to copy migrations from one place to another, changing migrations versions and adding scope to filename. For example: ActiveRecord::Migration.copy("db/migrate", :blog_engine => "vendor/gems/blog/db/migrate") will copy all migrations from vendor/gems/blog/db/migrate to db/migrate with such format: Versions of copied migrations will be reversioned to be appended after migrations that already exists in db/migrate
Diffstat (limited to 'activerecord/test/migrations/valid_with_timestamps/20100201010101_we_need_reminders.rb')
-rw-r--r--activerecord/test/migrations/valid_with_timestamps/20100201010101_we_need_reminders.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/migrations/valid_with_timestamps/20100201010101_we_need_reminders.rb b/activerecord/test/migrations/valid_with_timestamps/20100201010101_we_need_reminders.rb
new file mode 100644
index 0000000000..d5e71ce8ef
--- /dev/null
+++ b/activerecord/test/migrations/valid_with_timestamps/20100201010101_we_need_reminders.rb
@@ -0,0 +1,12 @@
+class WeNeedReminders < ActiveRecord::Migration
+ def self.up
+ create_table("reminders") do |t|
+ t.column :content, :text
+ t.column :remind_at, :datetime
+ end
+ end
+
+ def self.down
+ drop_table "reminders"
+ end
+end \ No newline at end of file