Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2020-04-22 13:42:06.572011+00:00

"""

import sqlalchemy as sa
from alembic import op

Expand All @@ -21,7 +22,7 @@ def upgrade():
"""
CREATE OR REPLACE FUNCTION check_group_uniqueness(name text, type text) RETURNS INT AS $$
BEGIN
IF type = 'EVERYONE' AND (SELECT COUNT(*) FROM groups WHERE groups.type = 'EVERYONE') = 1 THEN
IF type = 'EVERYONE' AND (SELECT COUNT(*) FROM public.groups WHERE groups.type = 'EVERYONE') = 1 THEN
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public? this is the default name of the schema (SEE postgres/scripts). Why would this be needed.
if so, why do we need it here and not in other tables?

RETURN 127;
END IF;
RETURN 0;
Expand Down
Loading