chore: update schema

This commit is contained in:
2026-03-10 21:11:46 +08:00
parent 6c2314d140
commit 4f85646ade
3 changed files with 32 additions and 9 deletions

View File

@@ -0,0 +1,3 @@
ALTER TABLE "id_tag" ALTER COLUMN "balance" SET DEFAULT 0;--> statement-breakpoint
ALTER TABLE "charge_point" ADD COLUMN "fee_per_kwh" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
ALTER TABLE "transaction" ADD COLUMN "charge_amount" integer;

View File

@@ -1,6 +1,6 @@
{ {
"id": "7a1c94ab-46cd-48cb-b84f-622da7a036c1", "id": "625f31c4-cd87-4d4d-ad2b-22cf47de4295",
"prevId": "19bd6e2d-1648-4da6-a8db-4f66712febde", "prevId": "7a1c94ab-46cd-48cb-b84f-622da7a036c1",
"version": "7", "version": "7",
"dialect": "postgresql", "dialect": "postgresql",
"tables": { "tables": {
@@ -488,6 +488,13 @@
"primaryKey": false, "primaryKey": false,
"notNull": false "notNull": false
}, },
"fee_per_kwh": {
"name": "fee_per_kwh",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"created_at": { "created_at": {
"name": "created_at", "name": "created_at",
"type": "timestamp with time zone", "type": "timestamp with time zone",
@@ -1020,6 +1027,13 @@
"primaryKey": false, "primaryKey": false,
"notNull": false "notNull": false
}, },
"balance": {
"name": "balance",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"created_at": { "created_at": {
"name": "created_at", "name": "created_at",
"type": "timestamp with time zone", "type": "timestamp with time zone",
@@ -1033,13 +1047,6 @@
"primaryKey": false, "primaryKey": false,
"notNull": true, "notNull": true,
"default": "now()" "default": "now()"
},
"balance": {
"name": "balance",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": "0"
} }
}, },
"indexes": {}, "indexes": {},
@@ -1535,6 +1542,12 @@
"primaryKey": false, "primaryKey": false,
"notNull": false "notNull": false
}, },
"charge_amount": {
"name": "charge_amount",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"reservation_id": { "reservation_id": {
"name": "reservation_id", "name": "reservation_id",
"type": "integer", "type": "integer",

View File

@@ -22,6 +22,13 @@
"when": 1773109529038, "when": 1773109529038,
"tag": "0002_melodic_moondragon", "tag": "0002_melodic_moondragon",
"breakpoints": true "breakpoints": true
},
{
"idx": 3,
"version": "7",
"when": 1773148285424,
"tag": "0003_fluffy_morbius",
"breakpoints": true
} }
] ]
} }