aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/migrations
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-05-09 19:41:33 +0200
committerIlion Beyst <ilion.beyst@gmail.com>2022-05-09 19:41:33 +0200
commita7d56ba0f54273920743109fe1a6541030f3c003 (patch)
tree879305f9682d6be538dea522b58ceeb07acbfd16 /planetwars-server/migrations
parent7b142554d808a494df4ba9e616c58861370ccd93 (diff)
downloadplanetwars.dev-a7d56ba0f54273920743109fe1a6541030f3c003.tar.xz
planetwars.dev-a7d56ba0f54273920743109fe1a6541030f3c003.zip
add ratings table
Diffstat (limited to 'planetwars-server/migrations')
-rw-r--r--planetwars-server/migrations/2022-04-28-171349_create_rating/down.sql2
-rw-r--r--planetwars-server/migrations/2022-04-28-171349_create_rating/up.sql7
2 files changed, 9 insertions, 0 deletions
diff --git a/planetwars-server/migrations/2022-04-28-171349_create_rating/down.sql b/planetwars-server/migrations/2022-04-28-171349_create_rating/down.sql
new file mode 100644
index 0000000..8267412
--- /dev/null
+++ b/planetwars-server/migrations/2022-04-28-171349_create_rating/down.sql
@@ -0,0 +1,2 @@
+-- This file should undo anything in `up.sql`
+drop table ratings; \ No newline at end of file
diff --git a/planetwars-server/migrations/2022-04-28-171349_create_rating/up.sql b/planetwars-server/migrations/2022-04-28-171349_create_rating/up.sql
new file mode 100644
index 0000000..39fe6fe
--- /dev/null
+++ b/planetwars-server/migrations/2022-04-28-171349_create_rating/up.sql
@@ -0,0 +1,7 @@
+-- Your SQL goes here
+-- this table could later be expanded to include more information,
+-- such as rating state (eg. number of matches played) or scope (eg. map)
+create table ratings (
+ bot_id integer PRIMARY KEY REFERENCES bots(id),
+ rating float NOT NULL
+) \ No newline at end of file