From 5b10d5e98e806ce867d27c4cc7b7f5651656744f Mon Sep 17 00:00:00 2001
From: Ilion Beyst <ilion.beyst@gmail.com>
Date: Mon, 3 Jan 2022 23:33:00 +0100
Subject: add match_state to matches

---
 planetwars-server/migrations/2022-01-02-105610_matches/up.sql | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'planetwars-server/migrations/2022-01-02-105610_matches/up.sql')

diff --git a/planetwars-server/migrations/2022-01-02-105610_matches/up.sql b/planetwars-server/migrations/2022-01-02-105610_matches/up.sql
index 88c8c9e..ace13fd 100644
--- a/planetwars-server/migrations/2022-01-02-105610_matches/up.sql
+++ b/planetwars-server/migrations/2022-01-02-105610_matches/up.sql
@@ -1,5 +1,8 @@
+CREATE TYPE match_state AS ENUM ('playing', 'ended');
+
 CREATE TABLE matches (
-    id SERIAL PRIMARY KEY,
+    id SERIAL PRIMARY KEY NOT NULL,
+    state match_state NOT NULL,
     log_path text NOT NULL,
     created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
 );
-- 
cgit v1.2.3

