This project is archived and is in readonly mode.
Specifying timestamps in a migration does not honor options
Reported by Patrick Reagan | August 14th, 2008 @ 02:46 PM | in 2.x
Currently, this will fail in a migration
create_table :accounts do |accounts_table|
accounts_table.with_options :null => false do |t|
t.string :name
t.timestamps
end
end
The t.timestamps method should be updated to take even just a subset of options (like :null => false as above). This patch (attached) will allow you to specify additional options using .with_options as above, or even directly:
create_table :passwords do |t|
t.timestamps :null => false
end
Comments and changes to this ticket
-
Pratik August 22nd, 2008 @ 01:59 AM
- State changed from new to incomplete
Patch doesn't apply cleanly. Could you please upload a new patch against latest edge ? Also, no need to use with_options in the tests. And tests should test if the column was successfully created with specified options.
Thanks.
-
Patrick Reagan August 22nd, 2008 @ 04:16 AM
- no changes were found...
-
Patrick Reagan August 22nd, 2008 @ 04:16 AM
This updated patch should address your comments - I was able to apply the new one against the latest Edge (got a couple whitespace warnings). I also squashed the changeset down to a single commit to cut down on the noise.
-
Repository August 22nd, 2008 @ 12:49 PM
- State changed from incomplete to resolved
(from [683ff235e6b81d28962f5a71ff53730a1c118fc8]) Ensure t.timestamps respects options. [#828 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
-
Repository August 25th, 2008 @ 09:31 AM
(from [9c11b96c721e0aef3186e67ed1c9fdd172488668]) Ensure t.timestamps respects options. [#828 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 828 Specifying timestamps in a migration does not honor options (from [683ff235e6b81d28962f5a71ff53730a1c118fc8]) Ensure ...
- 828 Specifying timestamps in a migration does not honor options (from [9c11b96c721e0aef3186e67ed1c9fdd172488668]) Ensure ...