Update database schema. Client rules are randomly deleted because of the foreign key. Remove all foreign keys from db schema
This commit is contained in:
@@ -140,13 +140,6 @@ const schema: BUN_SQLITE_DatabaseSchemaType = {
|
|||||||
{
|
{
|
||||||
fieldName: "media_id",
|
fieldName: "media_id",
|
||||||
dataType: "INTEGER",
|
dataType: "INTEGER",
|
||||||
foreignKey: {
|
|
||||||
cascadeDelete: true,
|
|
||||||
destinationTableName: "media",
|
|
||||||
destinationTableColumnName: "id",
|
|
||||||
destinationTableColumnType: "INTEGER",
|
|
||||||
foreignKeyName: "media_paradigm_media_fk",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: "media_paradigm",
|
fieldName: "media_paradigm",
|
||||||
@@ -267,13 +260,6 @@ const schema: BUN_SQLITE_DatabaseSchemaType = {
|
|||||||
{
|
{
|
||||||
fieldName: "client_id",
|
fieldName: "client_id",
|
||||||
dataType: "INTEGER",
|
dataType: "INTEGER",
|
||||||
foreignKey: {
|
|
||||||
cascadeDelete: true,
|
|
||||||
destinationTableName: "clients",
|
|
||||||
destinationTableColumnName: "id",
|
|
||||||
destinationTableColumnType: "INTEGER",
|
|
||||||
foreignKeyName: "client_rules_client_fk",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: "rule_type",
|
fieldName: "rule_type",
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ install_dependencies() {
|
|||||||
log "installing app dependencies with bun ..."
|
log "installing app dependencies with bun ..."
|
||||||
cd "$INSTALL_DIR"
|
cd "$INSTALL_DIR"
|
||||||
"$BUN_BIN" install
|
"$BUN_BIN" install
|
||||||
"$BUN_BIN" db:schema
|
"$BUN_BIN" bun-sqlite schema
|
||||||
}
|
}
|
||||||
|
|
||||||
ensure_env_file() {
|
ensure_env_file() {
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ const port = SiteData["ServerPort"];
|
|||||||
await bunext.bunextInit();
|
await bunext.bunextInit();
|
||||||
|
|
||||||
const server = Bun.serve({
|
const server = Bun.serve({
|
||||||
hostname: "0.0.0.0",
|
hostname: development ? "localhost" : "0.0.0.0",
|
||||||
async fetch(req, server) {
|
async fetch(req, server) {
|
||||||
try {
|
try {
|
||||||
const url = new URL(req.url);
|
const url = new URL(req.url);
|
||||||
|
|||||||
Reference in New Issue
Block a user