mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-07-27 11:58:56 +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(),
|
||||
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),
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user