Fixed site ownership

This commit is contained in:
Leon Mika 2025-02-01 10:56:59 +11:00
parent cb54057305
commit 50f7e9632e
20 changed files with 192 additions and 78 deletions

View file

@ -22,7 +22,6 @@ CREATE TABLE sites (
owner_user_id BIGINT NOT NULL,
name TEXT NOT NULL UNIQUE,
title TEXT NOT NULL,
url TEXT NOT NULL,
theme TEXT NOT NULL,
props JSON NOT NULL,
@ -50,5 +49,6 @@ CREATE TABLE publish_targets (
url TEXT NOT NULL,
target_ref TEXT NOT NULL,
FOREIGN KEY (site_id) REFERENCES sites (id) ON DELETE CASCADE
FOREIGN KEY (site_id) REFERENCES sites (id) ON DELETE CASCADE,
UNIQUE (site_id, role)
);