-
Notifications
You must be signed in to change notification settings - Fork 2
Lesson 2 - Nguyen Minh Hai #14
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: 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.
Good 👍
| DROP TABLE IF EXISTS sso_organization; | ||
| CREATE TABLE sso_organization ( |
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.
Không nên xóa bảng vì có thể gây mất dữ liệu. Chỉ cần câu lệnh CREATE TABLE IF NOT EXISTS thì sẽ không bị lỗi khi bảng đã tồn tại.
| DROP TABLE IF EXISTS sso_organization; | |
| CREATE TABLE sso_organization ( | |
| CREATE TABLE IF NOT EXISTS sso_organization ( |
| DROP TABLE IF EXISTS sso_role; | ||
| CREATE TABLE sso_role( |
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.
| DROP TABLE IF EXISTS sso_role; | |
| CREATE TABLE sso_role( | |
| CREATE TABLE IF NOT EXISTS sso_role( |
|
|
||
| DROP TABLE IF EXISTS sso_role; | ||
| CREATE TABLE sso_role( | ||
| role_id uuid DEFAULT gen_random_uuid() PRIMARY KEY, |
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.
Nếu dùng UUID muốn gen random uuid cần cài thêm extension CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
| role_id uuid DEFAULT gen_random_uuid() PRIMARY KEY, | |
| role_id uuid DEFAULT uuid_generate_v4() PRIMARY KEY, |
| DROP TABLE IF EXISTS sso_user; | ||
| CREATE TABLE sso_user( |
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.
| DROP TABLE IF EXISTS sso_user; | |
| CREATE TABLE sso_user( | |
| CREATE TABLE IF NOT EXISTS sso_user( |
| DROP TABLE IF EXISTS sso_user_profile; | ||
| CREATE TABLE sso_user_profile ( |
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.
| DROP TABLE IF EXISTS sso_user_profile; | |
| CREATE TABLE sso_user_profile ( | |
| CREATE TABLE IF NOT EXISTS sso_user_profile ( |
No description provided.