From 473d3726111eb8f618f7f6f3942a201a5c9006e6 Mon Sep 17 00:00:00 2001 From: alphaeusmote <41258468-alphaeusmote@users.noreply.replit.com> Date: Thu, 10 Apr 2025 12:59:13 +0000 Subject: [PATCH] Add DNS provider association to records Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/1996a42b-f7a0-41c3-b416-cf02dc350f7e.jpg --- shared/schema.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shared/schema.ts b/shared/schema.ts index e29d94f..ab56fa4 100644 --- a/shared/schema.ts +++ b/shared/schema.ts @@ -62,6 +62,7 @@ export const dnsRecords = pgTable("dns_records", { isActive: boolean("is_active").default(true).notNull(), isAutoIP: boolean("is_auto_ip").default(false).notNull(), notes: text("notes"), + providerId: uuid("provider_id").references(() => providers.id, { onDelete: "set null" }), lastUpdated: timestamp("last_updated"), createdAt: timestamp("created_at").defaultNow().notNull(), }); @@ -375,6 +376,10 @@ export const dnsRecordsRelations = relations(dnsRecords, ({ one, many }) => ({ fields: [dnsRecords.domainId], references: [domains.id], }), + provider: one(providers, { + fields: [dnsRecords.providerId], + references: [providers.id], + }), history: many(dnsHistory), }));