update: allow deleting form with responses, block editing form with responses
Docker Build and Push / Build and Push Docker Image (push) Successful in 17m21s

This commit is contained in:
2026-03-01 20:58:05 +07:00
parent 8ae0c2ef8e
commit 80e031d6c9
2 changed files with 16 additions and 16 deletions
@@ -2,7 +2,7 @@ BEGIN;
CREATE TABLE form_responses (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
form_id UUID NOT NULL REFERENCES forms(id) ON DELETE RESTRICT,
form_id UUID NOT NULL REFERENCES forms(id) ON DELETE CASCADE,
user_id UUID REFERENCES users(id) ON DELETE SET NULL,
submitted_at TIMESTAMPTZ NOT NULL DEFAULT now()
);