forked from RiiConnect24/RiiTag-Next
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: SQL optimization (RiiConnect24#15)
* refactor: Began merging sql requests and grouping private keys * refactor: User page SQL code refactor and multi-game support * refactor: User edit page SQL optimized * refactor: Optimized SQL for edit page
- Loading branch information
Showing
8 changed files
with
274 additions
and
248 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
prisma/migrations/20230913142372_sqloptimization/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-- AlterTable | ||
alter table banned_user | ||
add constraint banned_user_user_id_fk | ||
foreign key (user_id) references user (id) | ||
on delete cascade; | ||
|
||
alter table game_sessions | ||
modify user_id int not null; | ||
|
||
alter table game_sessions | ||
add constraint game_sessions_user_id_fk | ||
foreign key (user_id) references user (id) | ||
on delete cascade; | ||
|
||
alter table riitag.game_sessions | ||
modify game_id int unsigned not null; | ||
|
||
alter table game_sessions | ||
add constraint game_sessions_game_game_pk_fk | ||
foreign key (game_id) references game (game_pk); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.