Commit a10be9aca5b5d4b0b77f0419834e5f335d180854
1 parent
c22d8d00
Exists in
master
[Redmine #4698]Restrição grupo usuário duplicar
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
cit-portal-api/src/main/resources/scripts-bd/postgres/v2.3.0/01-cit-portal-2.3.0-postgres.sql
0 → 100644
@@ -0,0 +1,4 @@ | @@ -0,0 +1,4 @@ | ||
1 | +-- Erick INICIO 19/05/2016 | ||
2 | + DELETE FROM grupousuario WHERE grupousuario.ctid NOT IN (SELECT MIN(grupousuario.ctid) FROM grupousuario GROUP BY grupo_id, usuario_id); | ||
3 | + ALTER TABLE grupousuario ADD CONSTRAINT grupousuario_unico UNIQUE (grupo_id, usuario_id); | ||
4 | +-- Erick FIM 19/05/2016 | ||
0 | \ No newline at end of file | 5 | \ No newline at end of file |