remove null requirement on agreement content
This commit is contained in:
11
src/db/migrations/000009 - null-user-agreement.sql
Normal file
11
src/db/migrations/000009 - null-user-agreement.sql
Normal 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 $$;
|
||||||
Reference in New Issue
Block a user