Allow only CREATE in indexes
This commit is contained in:
parent
86dd57d13e
commit
47316741c1
1 changed files with 3 additions and 1 deletions
|
@ -114,8 +114,10 @@ class DbCursor:
|
|||
# Create indexes on table
|
||||
# Return: True on success
|
||||
def createIndexes(self, table, indexes):
|
||||
# indexes.append("CREATE INDEX %s_id ON %s(%s_id)" % (table, table, table)) # Primary key index
|
||||
for index in indexes:
|
||||
if not index.strip().upper().startswith("CREATE"):
|
||||
self.db.log.error("Index command should start with CREATE: %s" % index)
|
||||
continue
|
||||
self.execute(index)
|
||||
|
||||
# Create table if not exist
|
||||
|
|
Loading…
Reference in a new issue