Class: BardRake::Postgresql
- Inherits:
-
Object
- Object
- BardRake::Postgresql
- Extended by:
- Rake::DSL
- Defined in:
- lib/bard/rake/db_dump_load.rb
Class Method Summary collapse
Class Method Details
.dump ⇒ Object
50 51 52 53 54 |
# File 'lib/bard/rake/db_dump_load.rb', line 50 def dump pg_dump = `which pg_dump`.strip raise RuntimeError, "Cannot find pg_dump." if pg_dump.blank? sh "#{pg_dump} -f#{FILE_PATH} #{database}" end |
.load ⇒ Object
56 57 58 59 60 |
# File 'lib/bard/rake/db_dump_load.rb', line 56 def load psql = `which psql`.strip raise RuntimeError, "Cannot find psql." if psql.blank? sh "#{psql} -q -d#{database} -f#{FILE_PATH}" end |