mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Solution is disabling update if already done
This commit is contained in:
parent
c00cb1a61d
commit
8f8feef6de
@ -372,8 +372,10 @@ class MigrationManager(object):
|
|||||||
Create migrator
|
Create migrator
|
||||||
"""
|
"""
|
||||||
migrator = Migrator(self.database)
|
migrator = Migrator(self.database)
|
||||||
# Creating false migrations from the
|
# Running false migrations to retrives the schemes of
|
||||||
for name in self.diff:
|
# the precedents created tables in the table_dict element
|
||||||
|
# It's useful to run the new migrations
|
||||||
|
for name in self.done:
|
||||||
self.up_one(name, migrator, True)
|
self.up_one(name, migrator, True)
|
||||||
return migrator
|
return migrator
|
||||||
|
|
||||||
|
@ -22,6 +22,13 @@ def migrate(migrator: Migrator, database, **kwargs):
|
|||||||
"""
|
"""
|
||||||
db = database
|
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")
|
||||||
|
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)
|
# Servers New Model from Old (easier to migrate without dunmping Database)
|
||||||
# **********************************************************************************
|
# **********************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user