Skip to content
Permalink
Browse files

Merge pull request #39000 from elpaso/bugfix-gh38998-db-manager-pg-re…

…name-schema

Fix PG db-manager rename schema
  • Loading branch information
elpaso committed Sep 24, 2020
2 parents e7e08fd + 871f534 commit 569135718101394dc7c484aaf2853832426f8881
Showing with 7 additions and 0 deletions.
  1. +7 −0 python/plugins/db_manager/db_plugins/postgis/connector.py
@@ -901,6 +901,13 @@ def renameTable(self, table, new_table):
self.quoteString(new_table), self.quoteString(tablename), schema_where)
self._executeSql(sql)

def renameSchema(self, schema, new_schema):
try:
self.core_connection.renameSchema(schema, new_schema)
return True
except QgsProviderConnectionException:
return False

def commentTable(self, schema, tablename, comment=None):
if comment is None:
self._execute(None, 'COMMENT ON TABLE "{0}"."{1}" IS NULL;'.format(schema, tablename))

0 comments on commit 5691357

Please sign in to comment.
You can’t perform that action at this time.