mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fixing loog messages
This commit is contained in:
parent
b30d7b627c
commit
3529c9f7fe
@ -54,8 +54,8 @@ def migrate(migrator: Migrator, database, **kwargs):
|
||||
database = db
|
||||
|
||||
try:
|
||||
logger.error("Migrating Data from Int to UUID (Type Change)")
|
||||
Console.error("Migrating Data from Int to UUID (Type Change)")
|
||||
logger.info("Migrating Data from Int to UUID (Type Change)")
|
||||
Console.info("Migrating Data from Int to UUID (Type Change)")
|
||||
|
||||
# Changes on Server Table
|
||||
migrator.alter_column_type(
|
||||
@ -89,6 +89,9 @@ def migrate(migrator: Migrator, database, **kwargs):
|
||||
|
||||
migrator.run()
|
||||
|
||||
logger.info("Migrating Data from Int to UUID (Type Change) : SUCCESS")
|
||||
Console.info("Migrating Data from Int to UUID (Type Change) : SUCCESS")
|
||||
|
||||
except Exception as ex:
|
||||
logger.error("Error while migrating Data from Int to UUID (Type Change)")
|
||||
logger.error(ex)
|
||||
@ -164,6 +167,10 @@ def migrate(migrator: Migrator, database, **kwargs):
|
||||
RoleServers.role_id == role_servers.id
|
||||
and RoleServers.server_id == old_server_id
|
||||
).execute()
|
||||
|
||||
logger.error("Migrating Data from Int to UUID (Foreign Keys) : SUCCESS")
|
||||
Console.error("Migrating Data from Int to UUID (Foreign Keys) : SUCCESS")
|
||||
|
||||
except Exception as ex:
|
||||
logger.error("Error while migrating Data from Int to UUID (Foreign Keys)")
|
||||
logger.error(ex)
|
||||
@ -182,6 +189,9 @@ def migrate(migrator: Migrator, database, **kwargs):
|
||||
Servers.server_id == server.server_id
|
||||
).execute()
|
||||
|
||||
logger.error("Migrating Data from Int to UUID (Primary Keys) : SUCCESS")
|
||||
Console.error("Migrating Data from Int to UUID (Primary Keys) : SUCCESS")
|
||||
|
||||
except Exception as ex:
|
||||
logger.error("Error while migrating Data from Int to UUID (Primary Keys)")
|
||||
logger.error(ex)
|
||||
@ -192,8 +202,16 @@ def migrate(migrator: Migrator, database, **kwargs):
|
||||
return False
|
||||
|
||||
# Changes on Server Table
|
||||
logger.error("Migrating Data from Int to UUID (Removing UUID Field from Servers)")
|
||||
Console.error("Migrating Data from Int to UUID (Removing UUID Field from Servers)")
|
||||
migrator.drop_columns("servers", ["server_uuid"])
|
||||
migrator.run()
|
||||
logger.error(
|
||||
"Migrating Data from Int to UUID (Removing UUID Field from Servers) : SUCCESS"
|
||||
)
|
||||
Console.error(
|
||||
"Migrating Data from Int to UUID (Removing UUID Field from Servers) : SUCCESS"
|
||||
)
|
||||
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user