Commit 2d3f204a authored by Deamos's avatar Deamos

debugging

parent 7a7ebdf8
......@@ -210,18 +210,18 @@ def init_db_values():
app.config.update(SECURITY_REGISTERABLE=sysSettings.allowRegistration)
## Begin DB UTF8MB4 Fixes To Convert The DB if Needed
if config.dbLocation[:6] != "sqlite":
dbEngine = db.engine
dbConnection = dbEngine.connect()
dbConnection.execute("ALTER DATABASE `%s` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci'" % dbEngine.url.database)
sql = "SELECT DISTINCT(table_name) FROM information_schema.columns WHERE table_schema = '%s'" % dbEngine.url.database
results = dbConnection.execute(sql)
for row in results:
sql = "ALTER TABLE `%s` convert to character set DEFAULT COLLATE DEFAULT" % (row[0])
db.Connection.execute(sql)
db.close()
#if config.dbLocation[:6] != "sqlite":
# dbEngine = db.engine
# dbConnection = dbEngine.connect()
# dbConnection.execute("ALTER DATABASE `%s` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci'" % dbEngine.url.database)
# sql = "SELECT DISTINCT(table_name) FROM information_schema.columns WHERE table_schema = '%s'" % dbEngine.url.database
# results = dbConnection.execute(sql)
# for row in results:
# sql = "ALTER TABLE `%s` convert to character set DEFAULT COLLATE DEFAULT" % (row[0])
# db.Connection.execute(sql)
# db.close()
## End DB UT8MB4 Fixes
def check_existing_users():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment