ALTER TABLE "app_components" ADD COLUMN "port" INTEGER; ALTER TABLE "app_components" ADD COLUMN "target_port" INTEGER; CREATE TABLE "runtime_ingress_rules" ( "id" UUID NOT NULL DEFAULT gen_random_uuid(), "profile_id" UUID NOT NULL, "component_id" UUID NOT NULL, "host" TEXT NOT NULL, "path" TEXT NOT NULL DEFAULT '/', "service_port" INTEGER NOT NULL, "tls_enabled" BOOLEAN NOT NULL DEFAULT false, "tls_secret_name" TEXT, "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, CONSTRAINT "runtime_ingress_rules_pkey" PRIMARY KEY ("id") ); CREATE UNIQUE INDEX "runtime_ingress_rules_profile_id_host_path_key" ON "runtime_ingress_rules"("profile_id", "host", "path"); CREATE INDEX "runtime_ingress_rules_profile_id_idx" ON "runtime_ingress_rules"("profile_id"); CREATE INDEX "runtime_ingress_rules_component_id_idx" ON "runtime_ingress_rules"("component_id"); ALTER TABLE "runtime_ingress_rules" ADD CONSTRAINT "runtime_ingress_rules_profile_id_fkey" FOREIGN KEY ("profile_id") REFERENCES "runtime_env_profiles"("id") ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE "runtime_ingress_rules" ADD CONSTRAINT "runtime_ingress_rules_component_id_fkey" FOREIGN KEY ("component_id") REFERENCES "app_components"("id") ON DELETE CASCADE ON UPDATE CASCADE;