remove null requirement on agreement content

This commit is contained in:
2025-10-13 12:53:39 +00:00
parent a3bc2d25a6
commit 2c0af8e237

View File

@@ -0,0 +1,11 @@
DO $$ BEGIN
IF EXISTS (
SELECT 1
FROM information_schema.columns
WHERE table_name = 'agreement'
AND column_name = 'user_id'
AND is_nullable = 'NO'
) THEN
EXECUTE 'ALTER TABLE agreement ALTER COLUMN user_id DROP NOT NULL';
END IF;
END $$;