Method: Ardb::Adapter::Postgresql#load_sql_schema

Defined in:
lib/ardb/adapter/postgresql.rb

#load_sql_schemaObject



47
48
49
50
51
52
# File 'lib/ardb/adapter/postgresql.rb', line 47

def load_sql_schema
  require "scmd"
  cmd_str = "psql -f \"#{self.sql_schema_path}\" #{self.database}"
  cmd = Scmd.new(cmd_str, :env => env_var_hash).tap(&:run)
  raise "Error loading database" unless cmd.success?
end