Skip to content

Commit

Permalink
Consistent naming
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz authored and amercader committed Oct 12, 2012
1 parent 9ed76d0 commit a33b2df
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ckanext/datastore/commands.py
Expand Up @@ -134,17 +134,17 @@ def _run_sql(self, sql, as_sql_user, database='postgres'):
), inputstring=sql)

def create_db(self):
cmd = "sudo -u {pg_user} createdb -O '{ckan_user}' '{db}'".format(
pg_user=self.sql_superuser,
cmd = "sudo -u {pguser} createdb -O '{ckanuser}' '{db}'".format(
pguser=self.sql_superuser,
db=self.db_write_url_parts['db_name'],
ckan_user=self.db_ckan_url_parts['db_user'])
ckanuser=self.db_ckan_url_parts['db_user'])
self._run_cmd(cmd)

def create_write_user(self):
cmd = "sudo -u {pg_user} createuser \
--no-createdb --no-createrole --no-superuser '{write_user}'".format(
pg_user=self.sql_superuser,
write_user=self.db_write_url_parts['db_user'])
cmd = "sudo -u {pguser} createuser \
--no-createdb --no-createrole --no-superuser '{writeuser}'".format(
pguser=self.sql_superuser,
writeuser=self.db_write_url_parts['db_user'])
self._run_cmd(cmd)

def create_read_only_user(self):
Expand Down

0 comments on commit a33b2df

Please sign in to comment.