Chatwoot/lib/tasks/db_enhancements.rake
Sojan Jose 3ffb29bf4e
Chore: Squash previous migrations (#1107)
Fixes: #784
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-09-07 15:19:41 +05:30

7 lines
270 B
Ruby

# We are hooking config loader to run automatically everytime migration is executed
Rake::Task['db:migrate'].enhance do
if ActiveRecord::Base.connection.table_exists? 'installation_configs'
puts 'Loading Installation config'
ConfigLoader.new.process
end
end