This project is archived and is in readonly mode.
change_column carries over default when it can't be carried
-
CancelProfileIsBroken
- Tag changed from activerecord, active_record, migrate, migration, migrations, migrator, mysql to activerecord, active_record, bugmash, migrate, migration, migrations, migrator, mysql
-
dira
Not reproducible.
Tested in 2.3.stable and on master, by running the migration on the dev app & also in tests. The column is changed correctly and there is no error.
The attached file is a patch for the migration tests on stable; it shows that the error does not happen.
-
Greg Hazel
What version of MySQL, and what sql_mode? I run 5.0.xx in TRADITIONAL mode. Can you see the ALTER TABLE line it generates?
-
Elomar França
+1, verified on Mysql 5.0.81 in TRADITIONAL mode.
I've attached a patch with a test based on the one from dira and a tiny fix. Applies on 2-3-stable and master.
-
Elomar França
+1, verified on Mysql 5.0.81 in TRADITIONAL mode.
I've attached a patch with a test based on the one from dira and a tiny fix. Applies on 2-3-stable and master.
-
Prem Sichanugrist (sikachu)
- State changed from new to verified
- Milestone set to 2.3.6
-
Prem Sichanugrist (sikachu)
- Assigned user set to José Valim
-
José Valim
- Assigned user cleared.
-
Prem Sichanugrist (sikachu)
- Assigned user set to Pratik
-
Rizwan Reza
- Tag changed from activerecord, active_record, bugmash, migrate, migration, migrations, migrator, mysql to activerecord, active_record, migrate, migration, migrations, migrator, mysql
-
Rizwan Reza
- Tag changed from activerecord, active_record, migrate, migration, migrations, migrator, mysql to activerecord, active_record, bugmash, migrate, migration, migrations, migrator, mysql
-
Rizwan Reza
- Tag changed from activerecord, active_record, bugmash, migrate, migration, migrations, migrator, mysql to activerecord, active_record, bugmash-review, migrate, migration, migrations, migrator, mysql
-
Repository
- State changed from verified to resolved
(from [ddadcc7cf8332415ba48b66904ee6136b43dda6b]) Don't carry default value when changing column for a binary type on MySQL [#3234 change_column carries over default when it can't be carried state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/ddadcc7cf8332415ba48b66904ee61... -
Repository
(from [edec1afe25014749f0e2df86d27477b45586a9e3]) Don't carry default value when changing column for a binary type on MySQL [#3234 change_column carries over default when it can't be carried state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/edec1afe25014749f0e2df86d27477... -
Rizwan Reza
- Tag changed from activerecord, active_record, bugmash-review, migrate, migration, migrations, migrator, mysql to activerecord, active_record, migrate, migration, migrations, migrator, mysql
-
Repository
- State changed from resolved to open
(from [9d99e610be0da6e4b682ebb8cc410cdca1ca633a]) Revert "Don't carry default value when changing column for a binary type on MySQL"
Broke mysql tests.
This reverts commit ddadcc7cf8332415ba48b66904ee6136b43dda6b.
Conflicts:
activerecord/test/cases/migration_test.rb[#3234 change_column carries over default when it can't be carried state:open] http://github.com/rails/rails/commit/9d99e610be0da6e4b682ebb8cc410c...
-
Repository
(from [223d6415d045e670610603665c21e93b06a01db7]) Revert "Don't carry default value when changing column for a binary type on MySQL"
Broke mysql tests.
This reverts commit edec1afe25014749f0e2df86d27477b45586a9e3.
Conflicts:
activerecord/test/cases/migration_test.rb[#3234 change_column carries over default when it can't be carried state:open] http://github.com/rails/rails/commit/223d6415d045e670610603665c21e9...
-
Rizwan Reza
- No changes were found…
-
Santiago Pastorino
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale
-
Santiago Pastorino
Greg, glad you reopen the issue, can you make a patch that doesn't break mysql tests, for master, 3-0-stable and 2-3-stable.
Thanks a lot :). -
rails
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
rails
- State changed from open to stale
-
Greg Hazel
- State changed from stale to open
Oh no, not this again.
[state:open]
I would be happy to fix the patch, but I don't see how it failed. It just said "Broke mysql tests.". That's not very helpful.
