Skip to content

Commit ff3f48e

Browse files
committed
Migrate DB schemas
Adds migration for DB to add new values.
1 parent 31ec99d commit ff3f48e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from tortoise import BaseDBAsyncClient
2+
3+
4+
async def upgrade(db: BaseDBAsyncClient) -> str:
5+
return """
6+
ALTER TABLE "software" ADD "image_format" SMALLINT NOT NULL DEFAULT 0 /* SWU: 0\nRAUC: 1 */;"""
7+
8+
9+
async def downgrade(db: BaseDBAsyncClient) -> str:
10+
return """
11+
ALTER TABLE "software" DROP COLUMN "image_format";"""

0 commit comments

Comments
 (0)