summaryrefslogtreecommitdiff
path: root/server/migrations
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2022-10-15 09:34:44 -0400
committerKjetil Orbekk <kj@orbekk.com>2022-10-15 09:34:44 -0400
commit2d9d37bd5e4770a05cae780f2113266f3fdd0915 (patch)
tree2348c12d2be7590c5fe4a64cf759f749c02413a7 /server/migrations
parent58f91c62065d9a7e37c953503100b87b506297e7 (diff)
Add table creation
Diffstat (limited to 'server/migrations')
-rw-r--r--server/migrations/20221008120534_init.up.sql4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/migrations/20221008120534_init.up.sql b/server/migrations/20221008120534_init.up.sql
index 729446c..8c53bb8 100644
--- a/server/migrations/20221008120534_init.up.sql
+++ b/server/migrations/20221008120534_init.up.sql
@@ -16,10 +16,12 @@ create table active_tables (
id uuid primary key not null
);
+create type player_position as enum ('west', 'north', 'east', 'south');
+
create table table_players (
active_tables_id uuid not null references active_tables (id),
player_id varchar(64) not null references players (id),
- position jsonb,
+ position player_position,
primary key(active_tables_id, player_id, position)
);
create unique index player_table on table_players (player_id);