-
Notifications
You must be signed in to change notification settings - Fork 2
GBS-39 | User Follow Tablosunun adının düzeltilmesi #166
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
Conversation
Caution Review failedThe pull request is closed. WalkthroughDeğişiklikler, Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
…o the `gb_user_follow` table
@alpemreelmas bütün arkadaşları reviewer kısmına ekleyebilir miyiz? |
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
src/main/resources/db/migration/V1__ddl.sql (3)
Line range hint
1-13
: Consider adding a unique constraint on thename
field ingb_permission
table.To prevent duplicate permission names, it would be beneficial to add a unique constraint on the
name
field. This ensures that each permission has a distinct name in the system.You can add the unique constraint by including the following line in the table definition:
constraint u__gb_permission__name unique (name)
Line range hint
32-41
: Consider using UUID for primary key ingb_role_permission
table for consistency.While the current structure of the
gb_role_permission
table is functionally correct, it uses a bigint identity column as the primary key. This differs from the UUID approach used in other tables likegb_role
andgb_permission
.For consistency across the schema, consider using a UUID for the primary key:
CREATE TABLE IF NOT EXISTS gb_role_permission ( id VARCHAR(36) NOT NULL PRIMARY KEY, role_id VARCHAR(36) NOT NULL, permission_id VARCHAR(36) NOT NULL, CONSTRAINT u__gb_role_permission__role_id__permission_id UNIQUE (role_id, permission_id), CONSTRAINT fk__gb_role_permission__role_id FOREIGN KEY (role_id) REFERENCES gb_role (id), CONSTRAINT fk__gb_role_permission__permission_id FOREIGN KEY (permission_id) REFERENCES gb_permission (id) );This change would make the
gb_role_permission
table consistent with the primary key type used in related tables.
80-104
: Formatting inconsistency ingb_user_follow
table definition.The
gb_user_follow
table definition has been reformatted with explicit data types and line breaks. While this improves readability, it's inconsistent with the formatting of other table definitions in the file.Consider applying consistent formatting across all table definitions for better maintainability. Either:
- Apply the new formatting style to all tables, or
- Revert the
gb_user_follow
table to match the formatting of other tables.Example of consistent formatting:
CREATE TABLE IF NOT EXISTS gb_user_follow ( id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, follower_user_id VARCHAR(36) NOT NULL, followed_user_id VARCHAR(36) NOT NULL, created_by VARCHAR(255) NOT NULL, created_at TIMESTAMP(0) NOT NULL, updated_by VARCHAR(255), updated_at TIMESTAMP(0), CONSTRAINT u__gb_user_follow__follower_user_id__followed_user_id UNIQUE (follower_user_id, followed_user_id), CONSTRAINT fk__gb_user_follow__follower_user_id FOREIGN KEY (follower_user_id) REFERENCES gb_user (id), CONSTRAINT fk__gb_user_follow__followed_user_id FOREIGN KEY (followed_user_id) REFERENCES gb_user (id) );
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- src/main/resources/db/migration/V1__ddl.sql (1 hunks)
🧰 Additional context used
🔇 Additional comments (2)
src/main/resources/db/migration/V1__ddl.sql (2)
Line range hint
16-29
: Thegb_role
table definition looks good.The table structure for
gb_role
is well-defined and consistent with best practices. It includes:
- Appropriate fields for managing roles
- A unique constraint on the
name
field- A check constraint on the
status
field- Consistent use of UUID for the primary key
Line range hint
1-104
: Address overall document formatting for consistency.As mentioned in a previous review, there are formatting inconsistencies throughout the document. While some tables (like
gb_user_follow
) have been reformatted, others remain in the original format. This inconsistency can make the document harder to read and maintain.To improve readability and maintainability:
- Choose a consistent formatting style for all table definitions.
- Apply the chosen style consistently across the entire document.
- Consider using an SQL formatter tool to automate this process and ensure consistency in future changes.
This will address the formatting concerns raised in both the current and previous reviews.
@alpemreelmas pull request başlığını standartlara uygun olacak şekilde ingilizce olarak yazabilir miyiz? |
Summary by CodeRabbit