Skip to content

Commit

Permalink
Escape new schema name when altering a table
Browse files Browse the repository at this point in the history
When moving a table to another schema with a name which needs to be
escaped, this would have generated an error prior to this commit.
  • Loading branch information
MKleusberg committed Oct 5, 2017
1 parent 3d26c11 commit 3e02420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sqlitedb.cpp
Expand Up @@ -1168,7 +1168,7 @@ bool DBBrowserDB::renameColumn(const sqlb::ObjectIdentifier& tablename, const sq

// Copy the data from the old table to the new one
if(!executeSQL(QString("INSERT INTO %1.sqlitebrowser_rename_column_new_table SELECT %2 FROM %3;")
.arg(newSchemaName)
.arg(sqlb::escapeIdentifier(newSchemaName))
.arg(select_cols)
.arg(tablename.toString())))
{
Expand Down

0 comments on commit 3e02420

Please sign in to comment.