diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2022-10-13 08:13:12 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2022-10-13 08:13:12 -0400 |
commit | 1e0ceb4b7c714430ff42a1c98d416246f035d75f (patch) | |
tree | 24b840ba063648334a03089f653c7d0669b5c561 | |
parent | accb9032b9abe595020a27dd2f7b666cb7028f67 (diff) |
Add player positions to db
-rw-r--r-- | server/migrations/20221008120534_init.down.sql | 4 | ||||
-rw-r--r-- | server/migrations/20221008120534_init.up.sql | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/server/migrations/20221008120534_init.down.sql b/server/migrations/20221008120534_init.down.sql index ec1abe4..385537a 100644 --- a/server/migrations/20221008120534_init.down.sql +++ b/server/migrations/20221008120534_init.down.sql @@ -1,5 +1,7 @@ -- Add down migration script here -drop table if exists players; +begin; drop table if exists sessions; drop table if exists table_players; drop table if exists active_tables; +drop table if exists players; +commit; diff --git a/server/migrations/20221008120534_init.up.sql b/server/migrations/20221008120534_init.up.sql index 6a46f84..729446c 100644 --- a/server/migrations/20221008120534_init.up.sql +++ b/server/migrations/20221008120534_init.up.sql @@ -19,6 +19,7 @@ create table active_tables ( create table table_players ( active_tables_id uuid not null references active_tables (id), player_id varchar(64) not null references players (id), - primary key(active_tables_id, player_id) + position jsonb, + primary key(active_tables_id, player_id, position) ); create unique index player_table on table_players (player_id); |