Skip to content

Commit

Permalink
Merge pull request #730 from traPtitech/fix/post_game
Browse files Browse the repository at this point in the history
POST /game でジャンルを指定
  • Loading branch information
ikura-hamu authored Jan 10, 2024
2 parents 39d16fe + a5205ec commit 2a2054d
Show file tree
Hide file tree
Showing 21 changed files with 2,370 additions and 861 deletions.
8 changes: 6 additions & 2 deletions docs/db_schema/game_genre_relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ CREATE TABLE `game_genre_relations` (
`genre_id` varchar(36) NOT NULL,
`game_id` varchar(36) NOT NULL,
PRIMARY KEY (`genre_id`,`game_id`),
KEY `fk_game_genre_relations_game_table2_v11` (`game_id`),
KEY `fk_game_genre_relations_game_table2_v12` (`game_id`),
CONSTRAINT `fk_game_genre_relations_game_genre_table_v10` FOREIGN KEY (`genre_id`) REFERENCES `game_genres` (`id`),
CONSTRAINT `fk_game_genre_relations_game_genre_table_v11` FOREIGN KEY (`genre_id`) REFERENCES `game_genres` (`id`),
CONSTRAINT `fk_game_genre_relations_game_genre_table_v12` FOREIGN KEY (`genre_id`) REFERENCES `game_genres` (`id`),
CONSTRAINT `fk_game_genre_relations_game_table2_v11` FOREIGN KEY (`game_id`) REFERENCES `games` (`id`),
CONSTRAINT `fk_game_genre_relations_game_table2_v12` FOREIGN KEY (`game_id`) REFERENCES `games` (`id`),
CONSTRAINT `fk_game_genre_relations_game_table2_v5` FOREIGN KEY (`game_id`) REFERENCES `games` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
```
Expand All @@ -35,15 +37,17 @@ CREATE TABLE `game_genre_relations` (
| ---- | ---- | ---------- |
| fk_game_genre_relations_game_genre_table_v10 | FOREIGN KEY | FOREIGN KEY (genre_id) REFERENCES game_genres (id) |
| fk_game_genre_relations_game_genre_table_v11 | FOREIGN KEY | FOREIGN KEY (genre_id) REFERENCES game_genres (id) |
| fk_game_genre_relations_game_genre_table_v12 | FOREIGN KEY | FOREIGN KEY (genre_id) REFERENCES game_genres (id) |
| fk_game_genre_relations_game_table2_v11 | FOREIGN KEY | FOREIGN KEY (game_id) REFERENCES games (id) |
| fk_game_genre_relations_game_table2_v12 | FOREIGN KEY | FOREIGN KEY (game_id) REFERENCES games (id) |
| fk_game_genre_relations_game_table2_v5 | FOREIGN KEY | FOREIGN KEY (game_id) REFERENCES games (id) |
| PRIMARY | PRIMARY KEY | PRIMARY KEY (genre_id, game_id) |

## Indexes

| Name | Definition |
| ---- | ---------- |
| fk_game_genre_relations_game_table2_v11 | KEY fk_game_genre_relations_game_table2_v11 (game_id) USING BTREE |
| fk_game_genre_relations_game_table2_v12 | KEY fk_game_genre_relations_game_table2_v12 (game_id) USING BTREE |
| PRIMARY | PRIMARY KEY (genre_id, game_id) USING BTREE |

## Relations
Expand Down
136 changes: 75 additions & 61 deletions docs/db_schema/game_genre_relations.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 40 additions & 33 deletions docs/db_schema/game_genres.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/db_schema/game_images.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ CREATE TABLE `game_images` (
`image_type_id` tinyint(4) NOT NULL,
`created_at` datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
KEY `fk_game_images_game_image_type` (`image_type_id`),
KEY `fk_games_game_images` (`game_id`),
KEY `fk_game_images_game_image_type` (`image_type_id`),
CONSTRAINT `fk_game_images_game_image_type` FOREIGN KEY (`image_type_id`) REFERENCES `game_image_types` (`id`),
CONSTRAINT `fk_games_game_images` FOREIGN KEY (`game_id`) REFERENCES `games` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
Expand Down
Loading

0 comments on commit 2a2054d

Please sign in to comment.