aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/migrations/valid_with_timestamps
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/migrations/valid_with_timestamps')
-rw-r--r--activerecord/test/migrations/valid_with_timestamps/20100101010101_valid_with_timestamps_people_have_last_names.rb11
-rw-r--r--activerecord/test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb14
-rw-r--r--activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb14
3 files changed, 39 insertions, 0 deletions
diff --git a/activerecord/test/migrations/valid_with_timestamps/20100101010101_valid_with_timestamps_people_have_last_names.rb b/activerecord/test/migrations/valid_with_timestamps/20100101010101_valid_with_timestamps_people_have_last_names.rb
new file mode 100644
index 0000000000..b938847170
--- /dev/null
+++ b/activerecord/test/migrations/valid_with_timestamps/20100101010101_valid_with_timestamps_people_have_last_names.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class ValidWithTimestampsPeopleHaveLastNames < ActiveRecord::Migration::Current
+ def self.up
+ add_column "people", "last_name", :string
+ end
+
+ def self.down
+ remove_column "people", "last_name"
+ end
+end
diff --git a/activerecord/test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb b/activerecord/test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb
new file mode 100644
index 0000000000..94551e8208
--- /dev/null
+++ b/activerecord/test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class ValidWithTimestampsWeNeedReminders < ActiveRecord::Migration::Current
+ 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
diff --git a/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb b/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb
new file mode 100644
index 0000000000..672edc5253
--- /dev/null
+++ b/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class ValidWithTimestampsInnocentJointable < ActiveRecord::Migration::Current
+ def self.up
+ create_table("people_reminders", id: false) do |t|
+ t.column :reminder_id, :integer
+ t.column :person_id, :integer
+ end
+ end
+
+ def self.down
+ drop_table "people_reminders"
+ end
+end