We are using Rake::Task['db:create'].enhance to add a new schema and create an extension in the newly created schema as below.
Rake::Task['db:create'].enhance do
ActiveRecord::Base.connection.execute('CREATE SCHEMA IF NOT EXISTS shared_extensions;')
ActiveRecord::Base.connection.execute('CREATE EXTENSION IF NOT EXISTS "uuid-ossp" SCHEMA shared_extensions;')
end
Can we enhance the test database preparation in the same way?
Aucun commentaire:
Enregistrer un commentaire