feat: Add support for Clever cloud deployments (#1703)

This commit is contained in:
Pranav Raj S 2021-01-29 17:08:40 +05:30 committed by GitHub
parent f9c3b7f2f1
commit b0563a666e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

5
clevercloud/ruby.json Normal file
View file

@ -0,0 +1,5 @@
{
"deploy": {
"sidekiq": true
}
}

View file

@ -18,7 +18,7 @@ db_namespace = namespace :db do
ActiveRecord::Base.configurations.configs_for(env_name: Rails.env).each do |db_config|
ActiveRecord::Base.establish_connection(db_config.config)
# handling case where database was created by the provider, with out running db:setup
if ActiveRecord::Base.connection.tables.count.zero?
unless ActiveRecord::Base.connection.table_exists? 'ar_internal_metadata'
db_namespace['load_config'].invoke if ActiveRecord::Base.schema_format == :ruby
ActiveRecord::Tasks::DatabaseTasks.load_schema_current(:ruby, ENV['SCHEMA'])
db_namespace['seed'].invoke