Skip to content

Conversation

@ndthang15
Copy link
Owner

No description provided.

Copy link
Owner Author

@ndthang15 ndthang15 left a comment

Choose a reason for hiding this comment

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

Very good 👍

CREATE TYPE gender_type AS ENUM ('male', 'female');

CREATE TABLE IF NOT EXISTS sso_organization (
org_id int PRIMARY KEY NOT NULL,
Copy link
Owner Author

Choose a reason for hiding this comment

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

Suggested change
org_id int PRIMARY KEY NOT NULL,
org_id int PRIMARY KEY NOT NULL generated always as identity,

role_id uuid DEFAULT uuid_generate_v4() PRIMARY KEY NOT NULL,
role_name text NOT NULL,
role_description text,
organization_id int NOT NULL,
Copy link
Owner Author

Choose a reason for hiding this comment

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

Suggested change
organization_id int NOT NULL,
organization_id int NOT NULL references sso_organization(org_id),

Comment on lines +63 to +64
organization_id int REFERENCES sso_user(user_id),
user_id uuid REFERENCES sso_organization(organization_id),
Copy link
Owner Author

Choose a reason for hiding this comment

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

Suggested change
organization_id int REFERENCES sso_user(user_id),
user_id uuid REFERENCES sso_organization(organization_id),
organization_id int REFERENCES sso_organization(org_id),
user_id uuid REFERENCES sso_user(user_id),

Comment on lines +69 to +70
user_id uuid REFERENCES sso_role(role_id),
role_id uuid REFERENCES sso_user(user_id),
Copy link
Owner Author

Choose a reason for hiding this comment

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

Suggested change
user_id uuid REFERENCES sso_role(role_id),
role_id uuid REFERENCES sso_user(user_id),
user_id uuid REFERENCES sso_user(user_id),
role_id uuid REFERENCES sso_role(role_id),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants