diff --git a/server/db/pg/schema/schema.ts b/server/db/pg/schema/schema.ts index 5342fda0..ffbe820c 100644 --- a/server/db/pg/schema/schema.ts +++ b/server/db/pg/schema/schema.ts @@ -25,7 +25,6 @@ export const domains = pgTable("domains", { preferWildcardCert: boolean("preferWildcardCert") }); - export const dnsRecords = pgTable("dnsRecords", { id: serial("id").primaryKey(), domainId: varchar("domainId") @@ -34,7 +33,7 @@ export const dnsRecords = pgTable("dnsRecords", { recordType: varchar("recordType").notNull(), // "NS" | "CNAME" | "A" | "TXT" baseDomain: varchar("baseDomain"), value: varchar("value").notNull(), - verified: boolean("verified").notNull().default(false), + verified: boolean("verified").notNull().default(false) }); export const orgs = pgTable("orgs", { @@ -706,6 +705,11 @@ export const setupTokens = pgTable("setupTokens", { // Blueprint runs export const blueprints = pgTable("blueprints", { blueprintId: serial("blueprintId").primaryKey(), + orgId: text("orgId") + .references(() => orgs.orgId, { + onDelete: "cascade" + }) + .notNull(), name: varchar("name").notNull(), source: varchar("source").notNull(), createdAt: integer("createdAt").notNull(),