File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 7373 DB_USERNAME : postgres
7474 DB_PASSWORD : postgres
7575 DB_PORT : 5432
76- run : bin/rails db:test:prepare test
76+ run : bin/rails test
Original file line number Diff line number Diff line change 22 Rails . application . config . after_initialize do
33 require "rake"
44 Rails . application . load_tasks
5- Rake ::Task [ "db:create" ] . invoke
6- Rake ::Task [ "db:migrate" ] . invoke
7- Rake ::Task [ "db:seed:replant" ] . invoke
5+ unless ActiveRecord ::Base . connection . data_source_exists? ( "schema_migrations" )
6+ Rake ::Task [ "db:create" ] . invoke
7+ Rake ::Task [ "db:migrate" ] . invoke
8+ Rake ::Task [ "db:seed:replant" ] . invoke
9+ end
10+ end
11+ end
12+
13+ if Rails . env . test?
14+ Rails . application . config . after_initialize do
15+ require "rake"
16+ Rails . application . load_tasks
17+ unless ActiveRecord ::Base . connection . data_source_exists? ( "schema_migrations" )
18+ Rake ::Task [ "db:create" ] . invoke
19+ Rake ::Task [ "db:migrate" ] . invoke
20+ end
821 end
922end
You can’t perform that action at this time.
0 commit comments