From b0563a666edb1fd0b6210b213e5f82e5dca24043 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Fri, 29 Jan 2021 17:08:40 +0530 Subject: [PATCH] feat: Add support for Clever cloud deployments (#1703) --- clevercloud/ruby.json | 5 +++++ lib/tasks/db_enhancements.rake | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 clevercloud/ruby.json diff --git a/clevercloud/ruby.json b/clevercloud/ruby.json new file mode 100644 index 000000000..299cabda3 --- /dev/null +++ b/clevercloud/ruby.json @@ -0,0 +1,5 @@ +{ + "deploy": { + "sidekiq": true + } +} diff --git a/lib/tasks/db_enhancements.rake b/lib/tasks/db_enhancements.rake index f106a4d37..32b7b2ce8 100644 --- a/lib/tasks/db_enhancements.rake +++ b/lib/tasks/db_enhancements.rake @@ -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