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.

This commit is contained in:
Silversthorn 2024-03-10 12:49:35 +00:00
parent 986576f243
commit 1e2ec6b643

View File

@ -369,11 +369,12 @@ class MigrationManager(object):
@cached_property @cached_property
def migrator(self) -> Migrator: def migrator(self) -> Migrator:
""" """
Create migrator and setup it with fake migrations. Create migrator
""" """
migrator = Migrator(self.database) migrator = Migrator(self.database)
for name in self.done: # Removing the up_one to prevent running all migration each time we got a new one. it's handled by migration.up
self.up_one(name, migrator, True) #for name in self.done:
# self.up_one(name, migrator, True)
return migrator return migrator
def compile(self, name, migrate="", rollback=""): def compile(self, name, migrate="", rollback=""):