aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures/migrations
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-01 14:27:32 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-01 14:27:32 +0000
commiteac7cf0b0608132673220d9045b8ff51dc0804e1 (patch)
tree770902bf0f248f387520de7312f6db9a3cf8f504 /activerecord/test/fixtures/migrations
parent28a11969ced52abf3d7d51f486779cf31d1efe1f (diff)
downloadrails-eac7cf0b0608132673220d9045b8ff51dc0804e1.tar.gz
rails-eac7cf0b0608132673220d9045b8ff51dc0804e1.tar.bz2
rails-eac7cf0b0608132673220d9045b8ff51dc0804e1.zip
Added preliminary support for an agile database migration technique (currently only for MySQL)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/migrations')
-rw-r--r--activerecord/test/fixtures/migrations/1_people_have_last_names.rb9
-rw-r--r--activerecord/test/fixtures/migrations/2_we_need_reminders.rb12
2 files changed, 21 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/migrations/1_people_have_last_names.rb b/activerecord/test/fixtures/migrations/1_people_have_last_names.rb
new file mode 100644
index 0000000000..009729b330
--- /dev/null
+++ b/activerecord/test/fixtures/migrations/1_people_have_last_names.rb
@@ -0,0 +1,9 @@
+class PeopleHaveLastNames < ActiveRecord::Migration
+ def self.up
+ add_column "people", "last_name", :string
+ end
+
+ def self.down
+ remove_column "people", "last_name"
+ end
+end \ No newline at end of file
diff --git a/activerecord/test/fixtures/migrations/2_we_need_reminders.rb b/activerecord/test/fixtures/migrations/2_we_need_reminders.rb
new file mode 100644
index 0000000000..ac5918f02a
--- /dev/null
+++ b/activerecord/test/fixtures/migrations/2_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