From befdc3a002a91cbea65915a0f4a98cca54588546 Mon Sep 17 00:00:00 2001 From: Owen Date: Thu, 6 Feb 2025 21:18:34 -0500 Subject: [PATCH] Add table --- server/db/schema.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/db/schema.ts b/server/db/schema.ts index f44873d1..0e2a2f70 100644 --- a/server/db/schema.ts +++ b/server/db/schema.ts @@ -371,6 +371,16 @@ export const versionMigrations = sqliteTable("versionMigrations", { executedAt: integer("executedAt").notNull() }); +export const badgerRules = sqliteTable("badgerRules", { + ruleId: integer("ruleId").primaryKey({ autoIncrement: true }), + resourceId: integer("resourceId") + .notNull() + .references(() => resources.resourceId, { onDelete: "cascade" }), + action: text("action").notNull(), // ACCEPT, DROP + match: text("match").notNull(), // CIDR, PATH + value: text("value").notNull() +}); + export type Org = InferSelectModel; export type User = InferSelectModel; export type Site = InferSelectModel;