mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-27 18:57:28 +00:00
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
This commit is contained in:
@@ -62,6 +62,7 @@ export const dnsRecords = pgTable("dns_records", {
|
|||||||
isActive: boolean("is_active").default(true).notNull(),
|
isActive: boolean("is_active").default(true).notNull(),
|
||||||
isAutoIP: boolean("is_auto_ip").default(false).notNull(),
|
isAutoIP: boolean("is_auto_ip").default(false).notNull(),
|
||||||
notes: text("notes"),
|
notes: text("notes"),
|
||||||
|
providerId: uuid("provider_id").references(() => providers.id, { onDelete: "set null" }),
|
||||||
lastUpdated: timestamp("last_updated"),
|
lastUpdated: timestamp("last_updated"),
|
||||||
createdAt: timestamp("created_at").defaultNow().notNull(),
|
createdAt: timestamp("created_at").defaultNow().notNull(),
|
||||||
});
|
});
|
||||||
@@ -375,6 +376,10 @@ export const dnsRecordsRelations = relations(dnsRecords, ({ one, many }) => ({
|
|||||||
fields: [dnsRecords.domainId],
|
fields: [dnsRecords.domainId],
|
||||||
references: [domains.id],
|
references: [domains.id],
|
||||||
}),
|
}),
|
||||||
|
provider: one(providers, {
|
||||||
|
fields: [dnsRecords.providerId],
|
||||||
|
references: [providers.id],
|
||||||
|
}),
|
||||||
history: many(dnsHistory),
|
history: many(dnsHistory),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user