This project is archived and is in readonly mode.
index "unique_schema_migrations" should use table prefix/suffix
-
Jordi Bunster
- Tag changed from bug, migrations to bug, migrations, patch
+1
When I created the index I decided to use the
add_indexmethod instead of custom SQL, because I assumed it added the correct prefixes. I now see that it doesn't (not when using:nameanyway), just ascreate_tabledoesn't either. -
Frederick Cheung
- State changed from new to incomplete
Looks reasonable to me, could we have a test for this too?
-
Pratik
- Milestone cleared.
- Assigned user set to Frederick Cheung
-
CancelProfileIsBroken
- Tag changed from bug, migrations, patch to bug, bugmash, migrations, patch
-
Cristi Balan
Added a patch with test.
-
David Trasbo
+1
Patch applies cleanly to edge and the tests are passing.
-
Elad Meidar
+1 Patch applies cleanly on 2-3-stable as tests pass too.
Is it really necessary for 2 applications to create the same index ? i think it's something the developer and the DBA should decide before, no reason to create 2 unique indexes, can someone please come up with a case example ?
-
Cristi Balan
@elad: since two schema_migrations tables are created, each needs a different index
-
David Trasbo
verified
-
Tim Peters
Thanks for attending to this old issue :)
Minor comment: Christi's patch fixes the actual bug, but names the index starting with "unique" instead of the application prefix. The point of using a prefix is that all the objects in a shared schema can be grouped by name; the original patch named the index correctly.
-
Rizwan Reza
verified
The patch apply cleanly. All tests pass.
+1 I think Tim is right.
-
Jeremy Kemper
- State changed from incomplete to open
- Milestone set to 2.3.4
-
Repository
- State changed from open to committed
(from [7eaed4fefebf7a2084a7936775b6fc1b085f22ba]) Use table prefix and suffix for schema_migrations index.
[#1543 index "unique_schema_migrations" should use table prefix/suffix state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/7eaed4fefebf7a2084a7936775b6fc... -
Repository
(from [25fe43bc14c0803ca28ae9cdf965a4f85413166a]) Add tests for scoping schema_migrations index by global table prefix and suffix
[#1543 index "unique_schema_migrations" should use table prefix/suffix state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/25fe43bc14c0803ca28ae9cdf965a4... -
Repository
(from [3e35ba248154209d9c46e3d9fa78e98c1b5d0a96]) Add tests for scoping schema_migrations index by global table prefix and suffix
[#1543 index "unique_schema_migrations" should use table prefix/suffix state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/3e35ba248154209d9c46e3d9fa78e9... -
Repository
(from [9e96f37edd598d698c9f39c9af114198e5000c70]) Use table prefix and suffix for schema_migrations index.
[#1543 index "unique_schema_migrations" should use table prefix/suffix state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/9e96f37edd598d698c9f39c9af1141... -
Jeremy Kemper
- State changed from committed to open
- Tag changed from bug, bugmash, migrations, patch to bug, migrations, patch
-
Ryan Bigg
Jeremy, why was this re-opened?
-
Ryan Bigg
Automatic cleanup of spam.
-
Tim Peters
why was this ticket re-opened? It was fixed in 2.3.4 and is still fixed.
-
Santiago Pastorino
- State changed from open to resolved
- Assigned user changed from Frederick Cheung to Sam Ruby
Seems that this is already resolved, please comment if we need to re open it.
