remove null requirement on agreement content
This commit is contained in:
1 parent
a3bc2d25a6
commit
2c0af8e237
1 file changed
+11
@@ -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