You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're experiencing an issue where, when there are migrations to run, running parallel:migrate causes our structure.sql file to contain invalid SQL.
After glancing at the code it seems like parallel_tests is just running db:migrate in parallel for each of the databases, and so the issue isn't caused by parallel_tests itself but rather by Rails.
I would just like to confirm that this understanding is correct, as it would entail that one basically can't use parallel:migrate if you're using structure.sql over schema.rb.
The text was updated successfully, but these errors were encountered:
There could be an issue where the parallel migrations all write to the same file somehow.
You should be able to see the steps with rake <task> --trace.
The code looks like it's just running migrate X times, so a fix might be either:
run migrate, run a single "db:schema:dump" or "db:structure:dump"
save the original schema/structure, run migrate, restore it (that might be the easiest and fastest way)
... can you try these and see if they work ?
running a full migration before each test will be slow and brittle, so that's not a great approach
I'd prefer something like copying the schema, running parallel:migrate and then restoring the schema
(or finding a way to make the db tasks not dump the schema)
We're experiencing an issue where, when there are migrations to run, running
parallel:migrate
causes ourstructure.sql
file to contain invalid SQL.After glancing at the code it seems like
parallel_tests
is just runningdb:migrate
in parallel for each of the databases, and so the issue isn't caused byparallel_tests
itself but rather by Rails.I would just like to confirm that this understanding is correct, as it would entail that one basically can't use
parallel:migrate
if you're usingstructure.sql
overschema.rb
.The text was updated successfully, but these errors were encountered: