aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorMichael Duchemin <msducheminjr@users.noreply.github.com>2019-01-27 00:23:47 -0500
committerMichael Duchemin <msducheminjr@users.noreply.github.com>2019-02-09 15:34:13 -0500
commit93d2090011b5ccab504b8aeabf6a95b23193a689 (patch)
tree8693a081352744a2c770d3c2b072f910975cbfb2 /activerecord/CHANGELOG.md
parentea0eaced55465ce8054cf54ff583d75272bd8505 (diff)
downloadrails-93d2090011b5ccab504b8aeabf6a95b23193a689.tar.gz
rails-93d2090011b5ccab504b8aeabf6a95b23193a689.tar.bz2
rails-93d2090011b5ccab504b8aeabf6a95b23193a689.zip
Add class option timestamps to migration generator
Fixes GH#28706. Now rails g migration create_users and rails g model User have the same behavior for timestamps since they implement the same migration template. The expected behavior is that this create table migration will create the table with timestamps unless you pass --no-timestamps or --skip-timestamps to the generator. The expected migration should match what you get when you use the model generator. Using the migration generator, which doesn't have a class_option for timestamps would cause them to not be added to the migration file. Now the migration behavior of the migration generator, create_table only, is aligned with the migration behavior of the model generator. Also modified relevant example of ActiveRecord Migrations Guide.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index f16a746b91..618aecfd5d 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,7 @@
+* Allow generated create_table migrations to include or skip timestamps
+
+ *Michael Duchemin*
+
* Fix `relation.create` to avoid leaking scope to initialization block and callbacks.
Fixes #9894, #17577.