Closed isgroup-srl closed 6 years ago
Can anybody repair this issue? Thanks a lot
schemaobject->index.py->class IndexSchema(object)->drop,
if self.name == 'PRIMARY':
return "DROP PRIMARY KEY"
else:
return "DROP INDEX %s
ON %s
" % (self.name, self.parent.name)
changed to:
if self.name == 'PRIMARY': return "DROP PRIMARY KEY" else: return "DROP INDEX `%s``" % (self.name)
@jacoryjin if you can submit a PR, I'll merge it
This should be fixed in mmatuson/SchemaObject#13
@mmatuson any chance of getting the referenced PR above merged in (as it should fix this issue)?
There should not be an
ON
statement afterDROP INDEX
inside anALTER TABLE
query (http://dev.mysql.com/doc/refman/5.7/en/alter-table.html). This behavior is legit if theDROP INDEX
is used as a standalone query (http://dev.mysql.com/doc/refman/5.7/en/drop-index.html).Should be: