This commit is contained in:
Milo Schwartz 2024-11-15 23:38:16 -05:00
commit f7ff9e1e40
11 changed files with 88 additions and 55 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"),
@ -76,6 +76,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", {