From 8fa1b37bb705371bf5dee574f1f136019d3db9d1 Mon Sep 17 00:00:00 2001
From: Kjetil Orbekk <kj@orbekk.com>
Date: Tue, 15 Nov 2022 14:14:02 -0500
Subject: Implement DbJournal

---
 server/migrations/20221008120534_init.up.sql | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(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 e4b9eb1..db9fd3c 100644
--- a/server/migrations/20221008120534_init.up.sql
+++ b/server/migrations/20221008120534_init.up.sql
@@ -16,12 +16,12 @@ create table active_tables (
   id			     uuid primary key not null
 );
 
-create table table_journal (
-  table_id			uuid references active_tables(id) not null,
+create table object_journal (
+  id   	     			uuid not null,
   seq				bigint not null,
-  payload			jsonb
+  payload			jsonb not null
 );
-create unique index journal_entry on table_journal (table_id, seq);
+create unique index journal_entry on object_journal (id, seq);
 
 create type player_position as enum ('west', 'north', 'east', 'south');
 
-- 
cgit v1.2.3

