feat(database-migration): add new SQL migration for solid newton destine

- Introduced a new SQL script to add a "middlewares" column to the "domain" table with a default value of an empty text array.
- Updated the journal to include the new migration entry for version 0161.
- Added a snapshot file for version 7, detailing the schema changes for the "account" and "apikey" tables.
This commit is contained in:
Mauricio Siu
2026-04-04 09:47:11 -06:00
parent ed5e483f0b
commit e36ae4b4d6
4 changed files with 8295 additions and 2 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE "domain" ADD COLUMN "middlewares" text[] DEFAULT ARRAY[]::text[];

File diff suppressed because it is too large Load Diff

View File

@@ -1128,6 +1128,13 @@
"when": 1775316657754,
"tag": "0160_burly_odin",
"breakpoints": true
},
{
"idx": 161,
"version": "7",
"when": 1775317611429,
"tag": "0161_solid_newton_destine",
"breakpoints": true
}
]
}

View File

@@ -1,4 +1,4 @@
import { relations } from "drizzle-orm";
import { relations, sql } from "drizzle-orm";
import {
type AnyPgColumn,
boolean,
@@ -54,7 +54,7 @@ export const domains = pgTable("domain", {
certificateType: certificateType("certificateType").notNull().default("none"),
internalPath: text("internalPath").default("/"),
stripPath: boolean("stripPath").notNull().default(false),
middlewares: text("middlewares").array(),
middlewares: text("middlewares").array().default(sql`ARRAY[]::text[]`),
});
export const domainsRelations = relations(domains, ({ one }) => ({