Use --no-owner for dump/restore
This commit is contained in:
1 parent
edf78613bf
commit
72da5949c2
1 file changed
+2
-2
@@ -82,7 +82,7 @@ class Database(DatabaseInterface):
|
||||
from trytond.tools import exec_pg_command_pipe
|
||||
if CONFIG['db_password']:
|
||||
raise Exception('Couldn\'t dump database with password!')
|
||||
cmd = ['pg_dump', '--format=c']
|
||||
cmd = ['pg_dump', '--format=c', '--no-owner']
|
||||
if CONFIG['db_user']:
|
||||
cmd.append('--username=' + CONFIG['db_user'])
|
||||
if CONFIG['db_host']:
|
||||
@@ -111,7 +111,7 @@ class Database(DatabaseInterface):
|
||||
cursor.commit()
|
||||
cursor.close()
|
||||
|
||||
cmd = ['pg_restore']
|
||||
cmd = ['pg_restore', '--no-owner']
|
||||
if CONFIG['db_user']:
|
||||
cmd.append('--username=' + CONFIG['db_user'])
|
||||
if CONFIG['db_host']:
|
||||
|
||||
Reference in new issue
Block a user