Skip to content

Commit cf8a39d

Browse files
committed
Change for the correct quotations MySQL
1 parent 71cf0c3 commit cf8a39d

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

dev/prepare_db.pql

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ func run_sql(code) {
55
}
66

77
// Cleanup
8-
func cleanup() {
8+
func cleanup_double_quote() {
99
run_sql("DROP TABLE IF EXISTS \"Rating\"")
1010
run_sql("DROP TABLE IF EXISTS \"tmp_rating\"")
1111
run_sql("DROP TABLE IF EXISTS \"Rating_del1\"")
@@ -17,7 +17,24 @@ func cleanup() {
1717
commit()
1818
}
1919

20-
cleanup()
20+
func cleanup_backtick() {
21+
run_sql("DROP TABLE IF EXISTS `Rating`")
22+
run_sql("DROP TABLE IF EXISTS `tmp_rating`")
23+
run_sql("DROP TABLE IF EXISTS `Rating_del1`")
24+
run_sql("DROP TABLE IF EXISTS `Rating_update1`")
25+
run_sql("DROP TABLE IF EXISTS `Rating_update001p`")
26+
run_sql("DROP TABLE IF EXISTS `Rating_update1p`")
27+
run_sql("DROP TABLE IF EXISTS `Rating_del1p`")
28+
run_sql("DROP TABLE IF EXISTS `Rating_update50p`")
29+
commit()
30+
}
31+
32+
if (db_type == "mysql") {
33+
cleanup_backtick()
34+
}
35+
else {
36+
cleanup_double_quote
37+
}
2138

2239
// Import CSV
2340
if (db_type == "snowflake") {

0 commit comments

Comments
 (0)