padrino/padrino-framework · error
Error dumping database
Error message
Error dumping database
What it means
Error "Error dumping database" thrown in padrino/padrino-framework.
Source
Thrown at padrino-gen/lib/padrino-gen/padrino-tasks/activerecord.rb:262
end
namespace :structure do
desc 'Dump the database structure to a SQL file.'
task dump: :skeleton do
with_database(Padrino.env) do |config|
case config[:adapter]
when 'mysql', 'mysql2', 'em_mysql2', 'oci', 'oracle', 'jdbcmysql'
ActiveRecord::Tasks::DatabaseTasks.structure_dump(config.transform_keys(&:to_s), resolve_structure_sql)
when 'postgresql'
ENV['PGHOST'] = config[:host] if config[:host]
ENV['PGPORT'] = config[:port].to_s if config[:port]
ENV['PGPASSWORD'] = config[:password].to_s if config[:password]
search_path = config[:schema_search_path]
search_path = search_path.split(',').map { |path| "--schema=#{path.strip}" }.join(' ') if search_path
`pg_dump -U "#{config[:username]}" -s -x -O -f db/#{Padrino.env}_structure.sql #{search_path} #{config[:database]}`
raise 'Error dumping database' if $CHILD_STATUS.exitstatus == 1
when 'sqlite', 'sqlite3'
dbfile = config[:database] || config[:dbfile]
`#{config[:adapter]} #{dbfile} .schema > db/#{Padrino.env}_structure.sql`
when 'sqlserver'
`scptxfr /s #{config[:host]} /d #{config[:database]} /I /f db\\#{Padrino.env}_structure.sql /q /A /r`
`scptxfr /s #{config[:host]} /d #{config[:database]} /I /F db\ /q /A /r`
when 'firebird'
set_firebird_env(config)
db_string = firebird_db_string(config)
sh "isql -a #{db_string} > #{Padrino.root}/db/#{Padrino.env}_structure.sql"
else
raise "Task not supported by '#{config[:adapter]}'."
end
end
if !ActiveRecord::Base.connection.respond_to?(:supports_migrations?) || ActiveRecord::Base.connection.supports_migrations?
File.open(resolve_structure_sql, 'a') { |f| f << ActiveRecord::Base.connection.dump_schema_information }
endView on GitHub (pinned to 167044f3d5)
When it happens
Trigger: Thrown at padrino-gen/lib/padrino-gen/padrino-tasks/activerecord.rb:262 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of padrino/padrino-framework@167044f3d5 (2026-08-23).
Data as JSON: /api/errors/c118e26c3cce1abe.
Report an issue: GitHub.