fix: ajuste no SQL de hml

This commit is contained in:
NANDO9322 2026-02-03 12:17:27 -03:00
parent 67a82f2189
commit a35c8c27fa

View file

@ -494,3 +494,10 @@ BEGIN
END IF; END IF;
END $$; END $$;
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name='codigos_acesso' AND column_name='empresa_id') THEN
ALTER TABLE codigos_acesso ADD COLUMN empresa_id UUID REFERENCES empresas(id) ON DELETE SET NULL;
END IF;
END $$;