DEV: db:migrate no longer works after db:schema:load

In Rails 6 due to internal changes, the following sequence no longer works:

```
RAILS_ENV=test bin/rake db:migrate
RAILS_ENV=test bin/rake db:schema:dump
dropdb discourse_test
createdb discourse_test
RAILS_ENV=test bin/rake db:schema:load
RAILS_ENV=test bin/rake db:migrate
```

What appears to be happening is that our tracking of plugin migrations is
being missed on schema:dump or load.

A more comprehensive fix restoring schema:dump / load support will be
investigated.
This commit is contained in:
Sam Saffron 2019-09-18 13:17:49 +10:00
parent cd1ab206d9
commit 1ca257be79
1 changed files with 0 additions and 2 deletions

View File

@ -68,8 +68,6 @@ task 'db:migrate' => ['environment', 'set_locale'] do |_, args|
end
if MultisiteTestHelpers.load_multisite?
system("rake db:schema:dump")
system("RAILS_DB=discourse_test_multisite rake db:schema:load")
system("RAILS_DB=discourse_test_multisite rake db:migrate")
end
end