Skip to content
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

Fix duplicate DB when login (backend) #215

Merged
merged 4 commits into from
Sep 15, 2023
Merged

Conversation

kyudori
Copy link
Contributor

@kyudori kyudori commented Sep 15, 2023

Description

Fixed login error backend part. #209, #213
Created PR again due to incorrect commit.

Fixes #214

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code cleanup/refactoring
  • Documentation update
  • This change requires a documentation update
  • CI system update
  • Test Coverage update

How Has This Been Tested?

  • frontend
cd frontend
npm install
npm start
  • backend
mvn clean install
cd target
java -jar lpvs-*.jar

Test Configuration:

  • Java: v11
  • LPVS Release: v1.1.0

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Signed-off-by: Han Kyuhyun <[email protected]>
Co-authored-by: Jongmin Lee <[email protected]>
Co-authored-by: June Saehwan <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
@tiokim
Copy link
Member

tiokim commented Sep 15, 2023

Please add the UNIQUE constraint to the sql file like below.

--- a/src/main/resources/database_dump.sql
+++ b/src/main/resources/database_dump.sql
@@ -168,7 +168,8 @@ CREATE TABLE `member` (
   `name` varchar(255) NOT NULL,
   `nickname` varchar(255) DEFAULT NULL,
   `provider` varchar(10) NOT NULL,
-  `organization` varchar(255) DEFAULT NULL
+  `organization` varchar(255) DEFAULT NULL,
+  UNIQUE KEY `UK7blitxweiw758g32lg3bhavf6` (`email`,`provider`)

@tiokim tiokim added the bug Something isn't working label Sep 15, 2023
@tiokim tiokim linked an issue Sep 15, 2023 that may be closed by this pull request
Signed-off-by: Han Kyuhyun <[email protected]>
Co-authored-by: Jongmin Lee <[email protected]>
Co-authored-by: June Saehwan <[email protected]>
Co-authored-by: ByunJeongHeum <[email protected]>
@kyudori
Copy link
Contributor Author

kyudori commented Sep 15, 2023

I made a commit reflecting the your request.
Please review it. @tiokim

@o-kopysov o-kopysov requested a review from m-rudyk September 15, 2023 05:13
Copy link
Member

@tiokim tiokim left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@o-kopysov o-kopysov left a comment

Choose a reason for hiding this comment

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

LGTM

@o-kopysov o-kopysov merged commit d5c29a5 into Samsung:main Sep 15, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate Records in member table.
3 participants