This commit is contained in:
2026-09-13 06:53:33 +01:00
parent 75670e4d5c
commit e7e63bc491
45 changed files with 2117 additions and 22 deletions
+62 -1
View File
@@ -1,5 +1,6 @@
import { MediaParadigms, MediaTypes } from "@/src/dict/media-dict";
import { UserTypes } from "@/src/dict/user-types-dict";
import { Variables } from "@/src/dict/variables-dict";
import type { BUN_SQLITE_DatabaseSchemaType } from "@moduletrace/bun-sqlite/dist/types";
const schema: BUN_SQLITE_DatabaseSchemaType = {
@@ -157,7 +158,67 @@ const schema: BUN_SQLITE_DatabaseSchemaType = {
dataType: "INTEGER",
},
{
fieldName: "ip_address",
fieldName: "host_id",
dataType: "INTEGER",
defaultValue: 0,
},
{
fieldName: "name",
dataType: "TEXT",
},
{
fieldName: "wg_ip_address",
dataType: "TEXT",
},
{
fieldName: "public_ip_address",
dataType: "TEXT",
},
{
fieldName: "private_key",
dataType: "TEXT",
},
{
fieldName: "public_key",
dataType: "TEXT",
},
{
fieldName: "allowed_ips",
dataType: "TEXT",
},
],
},
{
tableName: "hosts",
fields: [
{
fieldName: "user_id",
dataType: "INTEGER",
},
{
fieldName: "wg_ip_address",
dataType: "TEXT",
},
{
fieldName: "private_key",
dataType: "TEXT",
},
{
fieldName: "public_key",
dataType: "TEXT",
},
],
},
{
tableName: "variables",
fields: [
{
fieldName: "key",
dataType: "TEXT",
options: Variables.map((v) => v.value),
},
{
fieldName: "value",
dataType: "TEXT",
},
],