-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
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,5 @@ | ||
DELETE FROM beatmap_pack_entries; | ||
DELETE FROM beatmap_packs; | ||
|
||
DROP TABLE beatmap_pack_entries; | ||
DROP TABLE beatmap_packs; |
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,16 @@ | ||
CREATE TABLE beatmap_packs ( | ||
id serial PRIMARY KEY, | ||
name character varying(255) NOT NULL, | ||
category character varying(255) NOT NULL, | ||
description text NOT NULL DEFAULT '', | ||
creator_id int NOT NULL REFERENCES users(id), | ||
created_at timestamp without timezone NOT NULL DEFAULT now(), | ||
updated_at timestamp without timezone NOT NULL DEFAULT now() | ||
); | ||
|
||
CREATE TABLE beatmap_pack_entries ( | ||
pack_id int NOT NULL REFERENCES beatmap_packs(id), | ||
beatmap_id int NOT NULL REFERENCES beatmaps(id), | ||
created_at timestamp without timezone NOT NULL DEFAULT now(), | ||
PRIMARY KEY (pack_id, beatmap_id) | ||
); |