mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Merge pull request #39000 from elpaso/bugfix-gh38998-db-manager-pg-rename-schema
Fix PG db-manager rename schema
This commit is contained in:
commit
5691357181
@ -901,6 +901,13 @@ class PostGisDBConnector(DBConnector):
|
||||
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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user