From aa066ef5bb9ed043feafd0e87e219cb34cce35c5 Mon Sep 17 00:00:00 2001
From: Ilion Beyst <ilion.beyst@gmail.com>
Date: Tue, 23 Aug 2022 20:00:21 +0200
Subject: create maps table

---
 planetwars-server/migrations/2022-08-23-174628_maps/up.sql | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 planetwars-server/migrations/2022-08-23-174628_maps/up.sql

(limited to 'planetwars-server/migrations/2022-08-23-174628_maps/up.sql')

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
-- 
cgit v1.2.3

