Add TypeScript definitions via pg-to-ts and refactor migrations

This commit is contained in:
thiloho
2024-09-10 17:29:57 +02:00
parent 8121be1d96
commit c5fbcdc8bd
50 changed files with 1525 additions and 1632 deletions

View File

@@ -7,10 +7,10 @@ BEGIN
SELECT
1
FROM
internal.website
internal.website AS w
WHERE
id = NEW.website_id
AND user_id = NEW.user_id) THEN
w.id = NEW.website_id
AND w.user_id = NEW.user_id) THEN
RAISE foreign_key_violation
USING message = 'User cannot be added as a collaborator to their own website';
END IF;