aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/migrations/2022-08-23-174628_maps/up.sql
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-server/migrations/2022-08-23-174628_maps/up.sql')
-rw-r--r--planetwars-server/migrations/2022-08-23-174628_maps/up.sql7
1 files changed, 7 insertions, 0 deletions
diff --git a/planetwars-server/migrations/2022-08-23-174628_maps/up.sql b/planetwars-server/migrations/2022-08-23-174628_maps/up.sql
new file mode 100644
index 0000000..c66fc9f
--- /dev/null
+++ b/planetwars-server/migrations/2022-08-23-174628_maps/up.sql
@@ -0,0 +1,7 @@
+CREATE TABLE maps (
+ id SERIAL PRIMARY KEY,
+ name TEXT UNIQUE NOT NULL,
+ file_path TEXT NOT NULL
+);
+
+ALTER TABLE matches ADD COLUMN map_id INTEGER REFERENCES maps(id); \ No newline at end of file