Skip to content

Commit

Permalink
#4980 Fixed reading indexes/triggers in TableWindow tabs.
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelsalawa committed Nov 19, 2024
1 parent 14eed30 commit 258f3ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SQLiteStudio3/coreSQLiteStudio/schemaresolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ QList<SqliteCreateIndexPtr> SchemaResolver::getParsedIndexesForTable(const QStri
{
static_qstring(idxForTableTpl, "SELECT sql, name FROM %1.sqlite_master WHERE type = 'index' AND lower(tbl_name) = lower('%2');");

QString query = idxForTableTpl.arg(wrapObjName(database), escapeString(table));
QString query = idxForTableTpl.arg(getPrefixDb(database), escapeString(table));
SqlQueryPtr results = db->exec(query, dbFlags);

QList<SqliteCreateIndexPtr> createIndexList;
Expand Down Expand Up @@ -1187,7 +1187,7 @@ QList<SqliteCreateTriggerPtr> SchemaResolver::getParsedTriggersForTableOrView(co
static_qstring(trigForTableTpl, "SELECT sql, name FROM %1.sqlite_master WHERE type = 'trigger' AND lower(tbl_name) = lower('%2');");
static_qstring(allTrigTpl, "SELECT sql FROM %1.sqlite_master WHERE type = 'trigger' AND lower(name) NOT IN (%2);");

QString query = trigForTableTpl.arg(wrapObjName(database), escapeString(tableOrView));
QString query = trigForTableTpl.arg(getPrefixDb(database), escapeString(tableOrView));
SqlQueryPtr results = db->exec(query, dbFlags);

QStringList alreadyProcessed;
Expand Down

0 comments on commit 258f3ff

Please sign in to comment.