Skip to content

Commit

Permalink
Update dlg_table_properties.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Ailurupoda committed Dec 27, 2018
1 parent 5b8de9a commit 805646d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions python/plugins/db_manager/dlg_table_properties.py
Expand Up @@ -336,15 +336,14 @@ def createComment(self):
#Function that add a comment to the selected table
try:
#Using the db connector, executing de SQL query Comment on table
self.db.connector._execute(None, 'COMMENT ON TABLE "{0}"."{1}" IS E\'{2}\';'.format(self.table.schema().name, self.table.name ,self.viewComment.text()))
self.db.connector._execute(None, 'COMMENT ON TABLE "{0}"."{1}" IS E\'{2}\';'.format(self.table.schema().name, self.table.name, self.viewComment.text()))
except DbError as e:
DlgDbError.showError(e, self)
return
self.refresh()
#Display successful message
QMessageBox.information(self, self.tr("Add comment"), self.tr("Table successfully commented"))


def deleteComment(self):
#Function that drop the comment to the selected table
try:
Expand All @@ -358,4 +357,3 @@ def deleteComment(self):
self.viewComment.setText('')
#Display successful message
QMessageBox.information(self, self.tr("Delete comment"), self.tr("Comment deleted"))

0 comments on commit 805646d

Please sign in to comment.