Removes table prefixes

This commit is contained in:
AffectedArc07
2021-07-26 17:21:24 +01:00
parent 63412043ee
commit bede78aeff
44 changed files with 244 additions and 852 deletions

View File

@@ -54,9 +54,9 @@ for file in orderedSqlFiles:
if file.endswith(".py"):
# Begin snowflakery
if file == "16-17.py":
scriptLines.append("python3 SQL/updates/" + str(file) + " 127.0.0.1 root root feedback feedback round\n")
scriptLines.append("python3 SQL/updates/" + str(file) + " 127.0.0.1 root root paradise_gamedb feedback round\n")
elif file == "17-18.py":
scriptLines.append("python3 SQL/updates/" + str(file) + " 127.0.0.1 root root feedback feedback feedback_2\n")
scriptLines.append("python3 SQL/updates/" + str(file) + " 127.0.0.1 root root paradise_gamedb feedback feedback_2\n")
else:
print("ERROR: CI failed due to invalid python file in SQL/updates")
exit(1)
@@ -64,8 +64,8 @@ for file in orderedSqlFiles:
inFile = open("SQL/updates/" + file, "r")
fileLines = inFile.readlines()
inFile.close()
# Add in a line which tells it to use the feedback DB
fileLines.insert(0, "USE `feedback`;\n")
# Add in a line which tells it to use the paradise DB
fileLines.insert(0, "USE `paradise_gamedb`;\n")
# Write new files to be used by the testing script
outFile = open("tools/ci/sql_tmp/" + file, "w+")
@@ -75,9 +75,7 @@ for file in orderedSqlFiles:
# Add a line to the script being made that tells it to use this SQL file
scriptLines.append("mysql -u root -proot < tools/ci/sql_tmp/" + str(file) + "\n")
scriptLines.append("mysql -u root -proot -e 'DROP DATABASE feedback;'\n")
scriptLines.append("mysql -u root -proot < SQL/paradise_schema_prefixed.sql\n")
scriptLines.append("mysql -u root -proot -e 'DROP DATABASE feedback;'\n")
scriptLines.append("mysql -u root -proot -e 'DROP DATABASE paradise_gamedb;'\n")
scriptLines.append("mysql -u root -proot < SQL/paradise_schema.sql\n")
outputScript = open("tools/ci/validate_sql.sh", "w+")