tasks/db.rake in pact_broker-2.24.0 vs tasks/db.rake in pact_broker-2.25.0
- old
+ new
@@ -94,16 +94,28 @@
# Private: Ensure the dev/test database directory exists
task 'prepare_dir' => 'db:env' do
PactBroker::Database.ensure_database_dir_exists
end
+ desc 'Annotate the Sequel domain classes with schema information'
+ task :annotate =>['db:set_postgres_database_adapter', 'db:migrate'] do
+ load 'tasks/database/annotate.rb'
+ require 'pact_broker/db'
+ PactBroker::DB.connection = PactBroker::Database.database
+ PactBroker::Annotate.call
+ end
+
# task :create => 'db:env' do
# PactBroker::Database.create
# end
# Private
task :set_test_env do
ENV['RACK_ENV'] = 'test'
+ end
+
+ task :set_postgres_database_adapter do
+ ENV['DATABASE_ADAPTER'] = 'postgres'
end
# Private
task 'env:nonprod' => ['bundler:setup'] do
# Allow default RACK_ENV to be set when not in production