Newt registration?

This commit is contained in:
Owen Schwartz 2024-11-15 21:53:58 -05:00
parent e141263b7e
commit 40734184af
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
11 changed files with 89 additions and 53 deletions

View file

@ -17,7 +17,7 @@ export const sites = sqliteTable("sites", {
onDelete: "set null",
}),
name: text("name").notNull(),
pubKey: text("pubKey").notNull(),
pubKey: text("pubKey"),
subnet: text("subnet").notNull(),
megabytesIn: integer("bytesIn"),
megabytesOut: integer("bytesOut"),
@ -77,6 +77,9 @@ export const newts = sqliteTable("newt", {
newtId: text("id").primaryKey(),
secretHash: text("secretHash").notNull(),
dateCreated: text("dateCreated").notNull(),
siteId: integer("siteId").references(() => sites.siteId, {
onDelete: "cascade",
}),
});
export const twoFactorBackupCodes = sqliteTable("twoFactorBackupCodes", {