-
Notifications
You must be signed in to change notification settings - Fork 2
Lesson 2 - Ngo Thi Hong Nhung #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: lesson2/main
Are you sure you want to change the base?
Conversation
ndthang15
left a comment
There was a problem hiding this 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| organization_id int NOT NULL, | |
| organization_id int NOT NULL references sso_organization(org_id), |
| organization_id int REFERENCES sso_user(user_id), | ||
| user_id uuid REFERENCES sso_organization(organization_id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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), |
| user_id uuid REFERENCES sso_role(role_id), | ||
| role_id uuid REFERENCES sso_user(user_id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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), |
No description provided.