This project is archived and is in readonly mode.
schema_statements#initialize_schema_migrations_table does not respect config.active_record.table_name_prefix
-
Gaius Centus Novus
On second thought, I'm not sure it has anything to do with config.active_record.table_name_prefix. I had a custom rake task that was mucking with the table_name_prefix. Removing the task causes the error message to change to
SQLite3::SQLException: index unique_schema_migrations already exists: CREATE UNIQUE INDEX "unique_schema_migrations" ON "ts_schema_migrations" ("version")That is, there's simply something wrong with trying to re-create the schema migrations index.
-
Tim Peters
Possibly related to #1543 index "unique_schema_migrations" should use table prefix/suffix (which includes a patch); that unique_schema_migrations index should use the table prefix in it's name.
-
Gaius Centus Novus
Digging a little further...
The reason I added the custom rake task to muck with table_name_prefix is that
rake db:migratehonoredtable_name_prefix. That is, the task (a) created tables in thedevelopmentenvironment with the prefix and (b) created aschema.rbfile with the prefixes. Then, when I ranrake db:test:load, it, too, honored the prefix, causing double prefixes.If
db:test:loadis going to honortable_name_prefix(which is should, since otherwise it gets theunique_schema_migrationsindex wrong),db:migrateshould NOT put prefixes intoschema.rb. -
Pratik
- State changed from new to duplicate