mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 18:24:52 -06:00
FIX: solution for pending migrations for bin/turbo_rspec
Currently, if you try to run `./bin/turbo_rspec` you will got that error `There are pending migrations, run rake parallel:migrate` Reason for that is that command is running in `development` mode which includes plugins migration files in ActiveRecord::Migrator.migrations_paths: ``` ["db/migrate", "/home/lis2/projects/discourse/plugins/discourse-details/db/migrate", "/home/lis2/projects/discourse/plugins/discourse-details/db/post_migrate", "/home/lis2/projects/discourse/plugins/discourse-local-dates/db/migrate", "/home/lis2/projects/discourse/plugins/discourse-local-dates/db/post_migrate", ... ] ``` A workaround solution would be to run the command with the TEST environment like `RAILS_ENV=test ./bin/turbo_rspec` I want to propose in this PR to override migration_paths to check only Discourse core migrations.
This commit is contained in:
parent
3dfe9f3b8d
commit
3f9673f23c
@ -80,6 +80,8 @@ module TurboTests
|
||||
.configurations["test"]
|
||||
.merge("database" => "discourse_test_1")
|
||||
|
||||
ActiveRecord::Migrator.migrations_paths = ['db/migrate', 'db/post_migrate']
|
||||
|
||||
conn = ActiveRecord::Base.establish_connection(config).connection
|
||||
begin
|
||||
ActiveRecord::Migration.check_pending!(conn)
|
||||
|
Loading…
Reference in New Issue
Block a user