Another fix try

This commit is contained in:
Ailurupoda 2019-02-07 16:59:12 +01:00
parent f27ecab62f
commit 832eb40166
2 changed files with 1 additions and 2 deletions

View File

@ -743,7 +743,7 @@ class PostGisDBConnector(DBConnector):
self._commit()
def commentTable(self, schema, tablename, comment=None, db):
if comment = None:
if comment == None:
db.connector._execute(None, 'COMMENT ON TABLE "{0}"."{1}" IS NULL;'.format(schema, tablename))
else:
db.connector._execute(None, 'COMMENT ON TABLE "{0}"."{1}" IS E\'{2}\';'.format(schema, tablename, comment))

View File

@ -582,7 +582,6 @@ class SpatiaLiteDBConnector(DBConnector):
def addTableColumn(self, table, field_def):
""" add a column to table """
sql = u"ALTER TABLE %s ADD %s" % (self.quoteId(table), field_def)
self._execute_and_commit(sql)
self._execute(None, sql)
sql = u"SELECT InvalidateLayerStatistics(%s)" % (self.quoteId(table))