Skip to content

Commit

Permalink
fix: drop table sql
Browse files Browse the repository at this point in the history
  • Loading branch information
rkawajiri committed Oct 19, 2023
1 parent d2222d5 commit 3fb4c44
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion google/cloud/sqlalchemy_spanner/sqlalchemy_spanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,10 @@ def visit_drop_table(self, drop_table, **kw):
for index in drop_table.element.indexes:
indexes += "DROP INDEX {};".format(self.preparer.quote(index.name))

return indexes + constrs + str(drop_table)
text = "\nDROP TABLE "
text += self.preparer.format_table(drop_table.element)

return indexes + constrs + text

def visit_primary_key_constraint(self, constraint, **kw):
"""Build primary key definition.
Expand Down

0 comments on commit 3fb4c44

Please sign in to comment.