Class: Backhoe::Postgresql
- Defined in:
- lib/backhoe/postgresql.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Instance Method Details
#dump(**_) ⇒ Object
5 6 7 8 9 |
# File 'lib/backhoe/postgresql.rb', line 5 def dump **_ pg_dump = `which pg_dump`.strip raise RuntimeError, "Cannot find pg_dump." if pg_dump.blank? sh "#{pg_dump} -c -f#{file_path} #{database}" end |
#load ⇒ Object
11 12 13 14 15 |
# File 'lib/backhoe/postgresql.rb', line 11 def load psql = `which psql`.strip raise RuntimeError, "Cannot find psql." if psql.blank? sh "#{psql} -q -d#{database} -f#{file_path}" end |