Skip to content

Commit

Permalink
added uids and password changed
Browse files Browse the repository at this point in the history
  • Loading branch information
priestc committed Apr 18, 2012
1 parent 928d45c commit 171aff9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions easydump/dumpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Dumper(object):
@classmethod
def get_restore_cmd(self, manifest):
if not self.restore_cmd:
raise NotImplemented("Sorry, your database type is not supported yet")
raise NotImplementedError("Sorry, your database type is not supported yet")

db_name = manifest.database['NAME']
db_user = manifest.database['USER']
Expand All @@ -25,7 +25,7 @@ def get_restore_cmd(self, manifest):
@classmethod
def get_dump_cmd(self, manifest):
if not self.dump_cmd:
raise NotImplemented("Sorry, your database type is not supported yet")
raise NotImplementedError("Sorry, your database type is not supported yet")

db_name = manifest.database['NAME']
db_user = manifest.database['USER']
Expand All @@ -44,7 +44,7 @@ def get_dump_cmd(self, manifest):

class PostgresDumper(Dumper):
restore_cmd = 'pg_restore -U {db_user} {db_host} {db_port} {db_pass} --dbname {db_name} --jobs={jobs} --no-owner easydump'
dump_cmd = "pg_dump -U {db_user} {db_host} {db_port} {db_pass} --no-acl --clean --no-owner --format=c {tables} {db_name} > easydump"
dump_cmd = "pg_dump -U {db_user} {db_host} {db_port} {db_pass} --no-acl --clean --oids --no-owner --format=c {tables} {db_name} > easydump"

@classmethod
def format_for_dump(cls, **kwargs):
Expand All @@ -54,11 +54,11 @@ def format_for_dump(cls, **kwargs):
kwargs['tables'] = tables

if kwargs['db_pass']:
kwargs['db_pass'] = "--password"
kwargs['db_pass'] = ""

if kwargs['db_port']:
kwargs['db_port'] = "-p %s" % kwargs['db_port']

if kwargs['db_host']:
kwargs['db_host'] = "-h %s" % kwargs['db_host']

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

METADATA = dict(
name='django-easydump',
version='0.2.5',
version='0.2.6',
#version=open('VERSION').read(),
author='Chris Priest',
author_email='cp368202@ohiou.edu',
Expand All @@ -29,4 +29,4 @@
)

if __name__ == '__main__':
setup(**METADATA)
setup(**METADATA)

0 comments on commit 171aff9

Please sign in to comment.