Skip to content

Commit

Permalink
Access schema migration object via base connection in Heroku task
Browse files Browse the repository at this point in the history
  • Loading branch information
ChargrilledChook committed Aug 10, 2024
1 parent 29b0cfe commit 5859a7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/heroku.rake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace :heroku do
desc 'Heroku release task - runs on every code push, runs before postdeploy task'
task release: :environment do
if ActiveRecord::SchemaMigration.table_exists?
if ActiveRecord::Base.connection.schema_migration.table_exists?
Rake::Task['db:migrate'].invoke
Rake::Task['db:seed'].invoke
Rake::Task['curriculum:content:import'].invoke
Expand Down

0 comments on commit 5859a7a

Please sign in to comment.