Skip to content

Commit

Permalink
Merge pull request #538 from performant-software/bugfix/sql-dump
Browse files Browse the repository at this point in the history
Fix two bugs with connecting to the database during export sql dump
  • Loading branch information
blms authored Nov 13, 2024
2 parents 3126cfb + 6ac3fb7 commit 8835b39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/workers/export_project_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,11 @@ def get_sql_records
}
manifest_yml = Tempfile.new("manifest.yml")
File.write(manifest_yml.path, manifest.to_yaml)
dbname = ENV["DATABASE_URL"] ? ENV["DATABASE_URL"].split('/')[-1] : Project.connection.current_database
TableSaw.configure({
manifest: manifest_yml.path,
dbname: Project.connection.current_database,
dbname: dbname,
})
::ActiveRecord::Base.establish_connection(TableSaw.configuration.connection)
TableSaw::DependencyGraph::Build.new(TableSaw::Manifest.instance).call
end
end

0 comments on commit 8835b39

Please sign in to comment.