app/models/chouette/loader.rb
# Load dump where datas are in schema 'chouette'
Load dump where datas are in schema 'chouette'
Load dump where datas are in schema ' chouette '
def load_dump(file)
    logger.info "Load #{file} in schema #{schema}"
    with_pg_password do
      execute!("sed -e 's/ chouette/ \"#{schema}\"/' -e 's/ OWNER TO .*;/ OWNER TO #{user};/' #{file} | psql #{pg_options} --set ON_ERROR_ROLLBACK=1 --set ON_ERROR_STOP=1")
    end
    self
  end
def load_dump ( file ) logger . info "Load #{file} in schema #{schema}" with_pg_password do execute! ( "sed -e 's/ chouette/ \"#{schema}\"/' -e 's/ OWNER TO .*;/ OWNER TO #{user};/' #{file} | psql #{pg_options} --set ON_ERROR_ROLLBACK=1 --set ON_ERROR_STOP=1" ) end self end
Load dump where datas are in schema 'chouette'
Load dump where datas are in schema ' chouette '
file