From e7dde2806c8da99d6ac34b0a480a88d706dae996 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 18 Feb 2024 18:10:33 +0100 Subject: [PATCH] docs: Change tutorials to use identity column instead of serial/sequence Resolves https://github.com/PostgREST/postgrest-docs/issues/311 --- docs/tutorials/tut0.rst | 2 +- docs/tutorials/tut1.rst | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/tutorials/tut0.rst b/docs/tutorials/tut0.rst index 42ed6d947..7ef3d3cf6 100644 --- a/docs/tutorials/tut0.rst +++ b/docs/tutorials/tut0.rst @@ -149,7 +149,7 @@ Our API will have one endpoint, :code:`/todos`, which will come from a table. .. code-block:: postgres create table api.todos ( - id serial primary key, + id int primary key generated by default as identity, done boolean not null default false, task text not null, due timestamptz diff --git a/docs/tutorials/tut1.rst b/docs/tutorials/tut1.rst index 3ca8ccc2b..181d25dad 100644 --- a/docs/tutorials/tut1.rst +++ b/docs/tutorials/tut1.rst @@ -22,7 +22,6 @@ The previous tutorial created a :code:`web_anon` role in the database with which grant usage on schema api to todo_user; grant all on api.todos to todo_user; - grant usage, select on sequence api.todos_id_seq to todo_user; Step 2. Make a Secret ---------------------