Disabling code if already updated to prevent unnecessary errors messages

This commit is contained in:
Silversthorn 2024-03-23 12:28:22 +01:00
parent 8f8feef6de
commit 5e4dbb1902

View File

@ -22,12 +22,10 @@ def migrate(migrator: Migrator, database, **kwargs):
"""
db = database
this_migration = MigrateHistory.get(MigrateHistory.name == "20240216_rework_servers_uuid_part2")
if this_migration:
Console.debug("Update database already done, skipping this migration")
this_migration = MigrateHistory.get_or_none(MigrateHistory.name == "20240216_rework_servers_uuid_part2")
if this_migration is not None:
Console.debug("Update database already done, skipping this part")
return
else :
Console.debug("Update database not done, doing : Migration Data from Int to UUID")
# **********************************************************************************
# Servers New Model from Old (easier to migrate without dunmping Database)