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.

Good 👍

Comment on lines +8 to +9
DROP TABLE IF EXISTS sso_organization;
CREATE TABLE sso_organization (
Copy link
Owner Author

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.

Suggested change
DROP TABLE IF EXISTS sso_organization;
CREATE TABLE sso_organization (
CREATE TABLE IF NOT EXISTS sso_organization (

Comment on lines +26 to +27
DROP TABLE IF EXISTS sso_role;
CREATE TABLE sso_role(
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
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,
Copy link
Owner Author

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";

Suggested change
role_id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
role_id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,

Comment on lines +35 to +36
DROP TABLE IF EXISTS sso_user;
CREATE TABLE sso_user(
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
DROP TABLE IF EXISTS sso_user;
CREATE TABLE sso_user(
CREATE TABLE IF NOT EXISTS sso_user(

Comment on lines +50 to +51
DROP TABLE IF EXISTS sso_user_profile;
CREATE TABLE sso_user_profile (
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
DROP TABLE IF EXISTS sso_user_profile;
CREATE TABLE sso_user_profile (
CREATE TABLE IF NOT EXISTS sso_user_profile (

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