feat: add publishMode column to port schema

- Introduced a new ENUM type "publishModeType" with values 'ingress' and 'host'.
- Added "publishMode" column to the "port" table with a default value of 'host'.
- Updated related metadata files to reflect the changes.
This commit is contained in:
Mauricio Siu
2025-07-04 23:33:21 -06:00
parent 56fcaa8ccd
commit f51c51958f
4 changed files with 7 additions and 6 deletions
@@ -1,2 +1,2 @@
CREATE TYPE "public"."publishModeType" AS ENUM('ingress', 'host');--> statement-breakpoint CREATE TYPE "public"."publishModeType" AS ENUM('ingress', 'host');--> statement-breakpoint
ALTER TABLE "port" ADD COLUMN "publishMode" "publishModeType" NOT NULL; ALTER TABLE "port" ADD COLUMN "publishMode" "publishModeType" DEFAULT 'host' NOT NULL;
+3 -2
View File
@@ -1,5 +1,5 @@
{ {
"id": "d95fe8f9-614d-4473-82f7-f2fb716a35b1", "id": "71f68c87-ddb4-4e8c-b9fc-1db7fbcedf56",
"prevId": "edde8c54-b715-4db6-bc3a-85d435226083", "prevId": "edde8c54-b715-4db6-bc3a-85d435226083",
"version": "7", "version": "7",
"dialect": "postgresql", "dialect": "postgresql",
@@ -2838,7 +2838,8 @@
"type": "publishModeType", "type": "publishModeType",
"typeSchema": "public", "typeSchema": "public",
"primaryKey": false, "primaryKey": false,
"notNull": true "notNull": true,
"default": "'host'"
}, },
"targetPort": { "targetPort": {
"name": "targetPort", "name": "targetPort",
+2 -2
View File
@@ -698,8 +698,8 @@
{ {
"idx": 99, "idx": 99,
"version": "7", "version": "7",
"when": 1751643236788, "when": 1751693569786,
"tag": "0099_calm_mesmero", "tag": "0099_wise_golden_guardian",
"breakpoints": true "breakpoints": true
} }
] ]
+1 -1
View File
@@ -14,7 +14,7 @@ export const ports = pgTable("port", {
.primaryKey() .primaryKey()
.$defaultFn(() => nanoid()), .$defaultFn(() => nanoid()),
publishedPort: integer("publishedPort").notNull(), publishedPort: integer("publishedPort").notNull(),
publishMode: publishModeType("publishMode").notNull(), publishMode: publishModeType("publishMode").notNull().default("host"),
targetPort: integer("targetPort").notNull(), targetPort: integer("targetPort").notNull(),
protocol: protocolType("protocol").notNull(), protocol: protocolType("protocol").notNull(),