From 6296e97fafd4bb5063541bee83061c398f31d19e Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Tue, 15 Nov 2022 12:25:25 -0500 Subject: Add journaling trait for game objects --- server/migrations/20221008120534_init.up.sql | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'server/migrations/20221008120534_init.up.sql') diff --git a/server/migrations/20221008120534_init.up.sql b/server/migrations/20221008120534_init.up.sql index 8c53bb8..e4b9eb1 100644 --- a/server/migrations/20221008120534_init.up.sql +++ b/server/migrations/20221008120534_init.up.sql @@ -16,6 +16,13 @@ create table active_tables ( id uuid primary key not null ); +create table table_journal ( + table_id uuid references active_tables(id) not null, + seq bigint not null, + payload jsonb +); +create unique index journal_entry on table_journal (table_id, seq); + create type player_position as enum ('west', 'north', 'east', 'south'); create table table_players ( -- cgit v1.2.3