From f991b79782b3dbe76a5a0fcbbef6571a5606952c Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 28 May 2024 19:42:02 -0400 Subject: [PATCH] Fix backup migration --- app/migrations/20240308_multi-backup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/migrations/20240308_multi-backup.py b/app/migrations/20240308_multi-backup.py index fc6650c7..c1a43acf 100644 --- a/app/migrations/20240308_multi-backup.py +++ b/app/migrations/20240308_multi-backup.py @@ -22,7 +22,10 @@ def migrate(migrator: Migrator, database, **kwargs): "Migrations: Adding columns [backup_id, " "backup_name, backup_location, enabled, default, action_id, backup_status]" ) - migrator.add_columns("backups", backup_id=peewee.UUIDField(default=uuid.uuid4)) + migrator.add_columns( + "backups", + backup_id=peewee.CharField(primary_key=True, default=Helpers.create_uuid), + ) migrator.add_columns("backups", backup_name=peewee.CharField(default="Default")) migrator.add_columns("backups", backup_location=peewee.CharField(default="")) migrator.add_columns("backups", enabled=peewee.BooleanField(default=True))