diff --git a/goosebit/db/migrations/models/1_20240911081506_add_image_format.py b/goosebit/db/migrations/models/1_20240911081506_add_image_format.py new file mode 100644 index 00000000..731e341c --- /dev/null +++ b/goosebit/db/migrations/models/1_20240911081506_add_image_format.py @@ -0,0 +1,11 @@ +from tortoise import BaseDBAsyncClient + + +async def upgrade(db: BaseDBAsyncClient) -> str: + return """ + ALTER TABLE "software" ADD "image_format" SMALLINT NOT NULL DEFAULT 0 /* SWU: 0\nRAUC: 1 */;""" + + +async def downgrade(db: BaseDBAsyncClient) -> str: + return """ + ALTER TABLE "software" DROP COLUMN "image_format";"""