Handle tables names with dashes
macbre opened this issue · 0 comments
macbre commented
SHOW CREATE TABLE foo_bar-metadata
2018-03-12 15:16:00 indexdigest.database.query ERROR Database error #1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-metadata' at line 1
File "/opt/wikia/index-digest/indexdigest/database.py", line 242, in get_table_schema
schema = str(self.query_row('SHOW CREATE TABLE {}'.format(table_name))[1])