Skip to content

Commit

Permalink
Migrate DB schemas
Browse files Browse the repository at this point in the history
Adds migration for DB to add new values.
  • Loading branch information
UpstreamData committed Sep 11, 2024
1 parent 1a91544 commit b624b53
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions goosebit/db/migrations/models/1_20240911081506_add_image_format.py
Original file line number Diff line number Diff line change
@@ -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";"""

0 comments on commit b624b53

Please sign in to comment.