diff --git a/db/schema.ts b/db/schema.ts index 2be45c1..a3c5172 100644 --- a/db/schema.ts +++ b/db/schema.ts @@ -140,13 +140,6 @@ const schema: BUN_SQLITE_DatabaseSchemaType = { { fieldName: "media_id", dataType: "INTEGER", - foreignKey: { - cascadeDelete: true, - destinationTableName: "media", - destinationTableColumnName: "id", - destinationTableColumnType: "INTEGER", - foreignKeyName: "media_paradigm_media_fk", - }, }, { fieldName: "media_paradigm", @@ -267,13 +260,6 @@ const schema: BUN_SQLITE_DatabaseSchemaType = { { fieldName: "client_id", dataType: "INTEGER", - foreignKey: { - cascadeDelete: true, - destinationTableName: "clients", - destinationTableColumnName: "id", - destinationTableColumnType: "INTEGER", - foreignKeyName: "client_rules_client_fk", - }, }, { fieldName: "rule_type", diff --git a/src/scripts/install-wg-ui.sh b/src/scripts/install-wg-ui.sh index 5a2f90b..fbe31e9 100755 --- a/src/scripts/install-wg-ui.sh +++ b/src/scripts/install-wg-ui.sh @@ -140,7 +140,7 @@ install_dependencies() { log "installing app dependencies with bun ..." cd "$INSTALL_DIR" "$BUN_BIN" install - "$BUN_BIN" db:schema + "$BUN_BIN" bun-sqlite schema } ensure_env_file() { diff --git a/src/server.ts b/src/server.ts index 1ff52f3..c9ea5cf 100644 --- a/src/server.ts +++ b/src/server.ts @@ -13,7 +13,7 @@ const port = SiteData["ServerPort"]; await bunext.bunextInit(); const server = Bun.serve({ - hostname: "0.0.0.0", + hostname: development ? "localhost" : "0.0.0.0", async fetch(req, server) { try { const url = new URL(req.url);