This project is archived and is in readonly mode.

#1543 ✓resolved
Tim Peters

index "unique_schema_migrations" should use table prefix/suffix

Reported by Tim Peters | December 10th, 2008 @ 06:32 AM | in 2.3.10

Create 2 rails apps, both of which share a database schema and use different table name prefixes.

in app1/config/environment.rb: config.active_record_table_name_prefix = 'app1_'

in app2/config/environment.rb: config.active_record_table_name_prefix = 'app2_'

The apps will correctly use the names app1_schema_migrations and app2_schema_migrations to hold migrations. However, both will try to create an index named "unique_schema_migrations" on their table. The second app which does this will get an error.

Attached patch adds any table prefix / suffix to the name of the unique_schema_migrations index.

Comments and changes to this ticket

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>