diff --git a/database/sqlite/migrations/2024-02-27-initial.sql b/database/sqlite/migrations/2024-02-27-initial.sql index a052158..496af72 100644 --- a/database/sqlite/migrations/2024-02-27-initial.sql +++ b/database/sqlite/migrations/2024-02-27-initial.sql @@ -45,8 +45,8 @@ CREATE TABLE monitor_worker_groups ( monitor_id TEXT NOT NULL, PRIMARY KEY (worker_group_id,monitor_id), - CONSTRAINT fk_monitor_worker_groups_worker_group FOREIGN KEY (worker_group_id) REFERENCES worker_groups(id), - CONSTRAINT fk_monitor_worker_groups_monitor FOREIGN KEY (monitor_id) REFERENCES monitors(id) + CONSTRAINT fk_monitor_worker_groups_worker_group FOREIGN KEY (worker_group_id) REFERENCES worker_groups(id) ON DELETE CASCADE, + CONSTRAINT fk_monitor_worker_groups_monitor FOREIGN KEY (monitor_id) REFERENCES monitors(id) ON DELETE CASCADE ) STRICT; CREATE TABLE monitor_histories ( @@ -59,8 +59,8 @@ CREATE TABLE monitor_histories ( created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ')), PRIMARY KEY (monitor_id, worker_group_id, created_at), - CONSTRAINT fk_monitor_histories_monitor FOREIGN KEY (monitor_id) REFERENCES monitors(id), - CONSTRAINT fk_monitor_histories_worker_group FOREIGN KEY (worker_group_id) REFERENCES worker_groups(id) + CONSTRAINT fk_monitor_histories_monitor FOREIGN KEY (monitor_id) REFERENCES monitors(id) ON DELETE CASCADE, + CONSTRAINT fk_monitor_histories_worker_group FOREIGN KEY (worker_group_id) REFERENCES worker_groups(id) ON DELETE CASCADE ) STRICT; -- +migrate Down diff --git a/deploy/fly.toml b/deploy/fly.toml index 61f0895..2e4f1fe 100644 --- a/deploy/fly.toml +++ b/deploy/fly.toml @@ -17,8 +17,8 @@ primary_region = 'waw' ROOT_URL = 'https://zdravko.mnts.dev' TEMPORAL_SERVER_HOST = 'server.process.zdravko.internal:7233' - TEMPORAL_DATABASE_PATH = '/data/temporal-8.db' - DATABASE_PATH = '/data/zdravko-8.db' + TEMPORAL_DATABASE_PATH = '/data/temporal-9.db' + DATABASE_PATH = '/data/zdravko-9.db' [processes] server = '--temporal --server' diff --git a/docs/screenshot.png b/docs/screenshot.png index 1ec5304..559db4c 100644 Binary files a/docs/screenshot.png and b/docs/screenshot.png differ