feat: Add support for Clever cloud deployments (#1703)
This commit is contained in:
parent
f9c3b7f2f1
commit
b0563a666e
2 changed files with 6 additions and 1 deletions
5
clevercloud/ruby.json
Normal file
5
clevercloud/ruby.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"deploy": {
|
||||||
|
"sidekiq": true
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,7 +18,7 @@ db_namespace = namespace :db do
|
||||||
ActiveRecord::Base.configurations.configs_for(env_name: Rails.env).each do |db_config|
|
ActiveRecord::Base.configurations.configs_for(env_name: Rails.env).each do |db_config|
|
||||||
ActiveRecord::Base.establish_connection(db_config.config)
|
ActiveRecord::Base.establish_connection(db_config.config)
|
||||||
# handling case where database was created by the provider, with out running db:setup
|
# 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
|
db_namespace['load_config'].invoke if ActiveRecord::Base.schema_format == :ruby
|
||||||
ActiveRecord::Tasks::DatabaseTasks.load_schema_current(:ruby, ENV['SCHEMA'])
|
ActiveRecord::Tasks::DatabaseTasks.load_schema_current(:ruby, ENV['SCHEMA'])
|
||||||
db_namespace['seed'].invoke
|
db_namespace['seed'].invoke
|
||||||
|
|
Loading…
Reference in a new issue