From 1e2ec6b6438b3975388679d1c960089cadf2bb32 Mon Sep 17 00:00:00 2001 From: Silversthorn Date: Sun, 10 Mar 2024 12:49:35 +0000 Subject: [PATCH] Removing the up_one in the constructor to prevent running all migration each time we got a new one. It's handled by migration.up() function. This function was not creating fake migrations. --- app/classes/shared/migration.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/classes/shared/migration.py b/app/classes/shared/migration.py index 1adea4c6..12d072c9 100644 --- a/app/classes/shared/migration.py +++ b/app/classes/shared/migration.py @@ -369,11 +369,12 @@ class MigrationManager(object): @cached_property def migrator(self) -> Migrator: """ - Create migrator and setup it with fake migrations. + Create migrator """ migrator = Migrator(self.database) - for name in self.done: - self.up_one(name, migrator, True) + # Removing the up_one to prevent running all migration each time we got a new one. it's handled by migration.up + #for name in self.done: + # self.up_one(name, migrator, True) return migrator def compile(self, name, migrate="", rollback=""):