Skip to content

Commit

Permalink
Sanitize table name when parsing for index creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nain57 committed Jun 1, 2024
1 parent c2c001d commit 5183d12
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ internal class SQLiteTableDetails private constructor(
sql.startsWith("CREATE INDEX") -> {
val columnName = sql.getColumnNameFromSQLiteCreateIndex()
if (filteredColumns.contains(columnName)) return@forEachRow
val sanitizedSql = sql.replace("\"", "`")

sqlCreateIndexes.add(sql.replace("`$originTableName`", "`$copyName`"))
sqlCreateIndexes.add(sanitizedSql.replace("`$originTableName`", "`$copyName`"))
}
}
}
Expand Down

0 comments on commit 5183d12

Please sign in to comment.