Class: BiblioTech::Builders::Postgres::Import
- Defined in:
- lib/bibliotech/builders/postgres.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Import
Methods inherited from Database
Methods inherited from Base
adapter_registry, for, #initialize, null_adapter, register, registry, supported_adapters
Constructor Details
This class inherits a constructor from BiblioTech::Builders::Base
Instance Method Details
#go(command) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/bibliotech/builders/postgres.rb', line 33 def go(command) command.from('pg_restore') command. << '-Oc' #Don't assign ownership, clean entries config.optional{ command. << "-h #{config.host}" } config.optional{ command.env["PGPASSWORD"] = config.password } config.optional{ command. << "-p #{config.port}" } #ok if config.local == "development" config.optional{ command. << "-U #{config.username}" } else command. << "-U #{config.username}" end command. << "-d #{config.database}" command end |