From cd43a6c90eb11081bb1bf6bc21cf670fbe4bfa3a Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 29 Nov 2019 12:52:52 +0100 Subject: [PATCH] :bug: Add missing version field on pages table. --- backend/resources/migrations/0004.pages.up.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/resources/migrations/0004.pages.up.sql b/backend/resources/migrations/0004.pages.up.sql index 22670e35d..1a46eb27f 100644 --- a/backend/resources/migrations/0004.pages.up.sql +++ b/backend/resources/migrations/0004.pages.up.sql @@ -10,6 +10,7 @@ CREATE TABLE IF NOT EXISTS pages ( modified_at timestamptz NOT NULL DEFAULT clock_timestamp(), deleted_at timestamptz DEFAULT NULL, + version bigint NOT NULL, ordering smallint, name text NOT NULL, @@ -23,8 +24,8 @@ CREATE TABLE IF NOT EXISTS pages_history ( user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE, page_id uuid NOT NULL REFERENCES pages(id) ON DELETE CASCADE, - created_at timestamptz NOT NULL, - modified_at timestamptz NOT NULL, + created_at timestamptz NOT NULL DEFAULT clock_timestamp(), + modified_at timestamptz NOT NULL DEFAULT clock_timestamp(), version bigint NOT NULL DEFAULT 0, pinned bool NOT NULL DEFAULT false,