mirror of
https://github.com/openSUSE/osem.git
synced 2026-04-20 23:07:47 -04:00
- add a big fat warning - Do not mentioned the deprecated docker setup anymore - Fixup docker-compose production setup
16 lines
475 B
Ruby
16 lines
475 B
Ruby
# frozen_string_literal: true
|
|
|
|
namespace :db do
|
|
desc 'Bootstrap the database for the current RAILS_ENV (create, setup & seed if the database does not exist)'
|
|
task bootstrap: :environment do
|
|
if ActiveRecord::Base.connection.tables.empty?
|
|
puts 'Bootstrapping the database...'
|
|
Rake::Task['db:create'].invoke
|
|
Rake::Task['db:setup'].invoke
|
|
Rake::Task['db:seed'].invoke
|
|
else
|
|
puts 'Database exists, skipping bootstrap...'
|
|
end
|
|
end
|
|
end
|