added settings page, cleanup

This commit is contained in:
Martin Drechsel
2025-05-19 12:29:37 +02:00
parent 6a1351752b
commit 0699dbef31
35 changed files with 889 additions and 653 deletions

View File

@ -1,18 +1,15 @@
import {
integer,
numeric,
sqliteTable,
text,
type AnySQLiteColumn,
unique,
type AnySQLiteColumn
} from "drizzle-orm/sqlite-core";
export const haexSettings = sqliteTable("haex_settings", {
id: text().primaryKey(),
key: text(),
value_text: text(),
value_json: text({ mode: "json" }),
value_number: numeric(),
value: text(),
});
export const haexExtensions = sqliteTable("haex_extensions", {
@ -25,18 +22,13 @@ export const haexExtensions = sqliteTable("haex_extensions", {
version: text(),
});
export const testTable = sqliteTable("testTable", {
id: text().primaryKey(),
author: text(),
test: text(),
});
export const haexExtensionsPermissions = sqliteTable(
"haex_extensions_permissions",
{
id: text().primaryKey(),
extensionId: text("extension_id").references((): AnySQLiteColumn => haexExtensions.id),
resource: text({ enum: ["fs", "http", "database"] }),
resource: text({ enum: ["fs", "http", "db", "shell"] }),
operation: text({ enum: ["read", "write", "create"] }),
path: text(),
},