Skip to content

Commit b0dceac

Browse files
committed
fix SQL errors
1 parent 17f81c7 commit b0dceac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/gen_fake_mysql_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
) ENGINE=InnoDB AUTO_INCREMENT=0;
3131
'''
3232

33-
DROP_TABLE_SQL_FMT = '''DROP TABLE IF NOT EXISTS {database}.{table};'''
33+
DROP_TABLE_SQL_FMT = '''DROP TABLE IF EXISTS {database}.{table};'''
3434

3535
INSERT_SQL_FMT = '''INSERT INTO {database}.{table} (customer_id, event, sku, amount, device, trans_datetime) VALUES("{customer_id}", "{event}", "{sku}", {amount}, "{device}", "{trans_datetime}");'''
3636

@@ -60,7 +60,7 @@ def main():
6060
db_url = DB_URL_FMT.format(user=options.user, password=options.password, host=options.host)
6161
if not options.dry_run:
6262
db = dataset.connect(db_url)
63-
63+
6464
if options.create_table:
6565
sql_stmt = CREATE_TABLE_SQL_FMT.format(database=options.database, table=options.table)
6666
print(sql_stmt)

0 commit comments

Comments
 (0)