Skip to content
Permalink
Browse files

Fix PG db-manager rename schema

Fixes #38998
  • Loading branch information
elpaso committed Sep 24, 2020
1 parent e7e08fd commit 871f534ef95e8024c52125ff08fef47099ac969c
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 871f534

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