diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-07-05 21:03:46 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-05 21:03:46 +0300 |
| commit | d35a9a945ecaeeceb21bd91eeeaa4c6ec0a15e24 (patch) | |
| tree | c7eca0aa1e5a84b3580a629bcce49215b6faf80e /backend/database/init.sql | |
| parent | feat: update map tables db schema (#157) (diff) | |
| download | lphub-d35a9a945ecaeeceb21bd91eeeaa4c6ec0a15e24.tar.gz lphub-d35a9a945ecaeeceb21bd91eeeaa4c6ec0a15e24.tar.bz2 lphub-d35a9a945ecaeeceb21bd91eeeaa4c6ec0a15e24.zip | |
feat: return portal count from games and chapter map select (#155)
Diffstat (limited to 'backend/database/init.sql')
| -rw-r--r-- | backend/database/init.sql | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/database/init.sql b/backend/database/init.sql index c33821b..77a88f5 100644 --- a/backend/database/init.sql +++ b/backend/database/init.sql | |||
| @@ -36,6 +36,15 @@ CREATE TABLE categories ( | |||
| 36 | PRIMARY KEY (id) | 36 | PRIMARY KEY (id) |
| 37 | ); | 37 | ); |
| 38 | 38 | ||
| 39 | CREATE TABLE game_categories ( | ||
| 40 | id SERIAL, | ||
| 41 | game_id SMALLINT NOT NULL, | ||
| 42 | category_id SMALLINT NOT NULL, | ||
| 43 | PRIMARY KEY (id), | ||
| 44 | FOREIGN KEY (game_id) REFERENCES games(id), | ||
| 45 | FOREIGN KEY (category_id) REFERENCES categories(id) | ||
| 46 | ); | ||
| 47 | |||
| 39 | CREATE TABLE maps ( | 48 | CREATE TABLE maps ( |
| 40 | id SERIAL, | 49 | id SERIAL, |
| 41 | game_id SMALLINT NOT NULL, | 50 | game_id SMALLINT NOT NULL, |