first commit
This commit is contained in:
commit
c9fb67e751
423 files changed
+53287
No files matched your search
@@ -0,0 +1,15 @@
|
||||
-- Verificar se todos os registros têm os valores
|
||||
DO $$
|
||||
BEGIN
|
||||
IF EXISTS (
|
||||
SELECT 1 FROM "processos"
|
||||
WHERE "tribunalUF" IS NULL OR "tribunal" IS NULL
|
||||
) THEN
|
||||
RAISE EXCEPTION 'Ainda existem registros com valores nulos';
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
-- Se passar da verificação, tornar as colunas NOT NULL
|
||||
ALTER TABLE "processos"
|
||||
ALTER COLUMN "tribunalUF" SET NOT NULL,
|
||||
ALTER COLUMN "tribunal" SET NOT NULL;
|
||||
Reference in new issue
Block a user