Last active
May 1, 2022 21:55
-
-
Save dschulz/3a850aa0248a687dabcd20d812aab331 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin transaction ; | |
drop schema restapi cascade; | |
create schema restapi; | |
commit; | |
begin transaction ; | |
--drop table if exists restapi.todos; | |
create table if not exists restapi.todos ( | |
id bigint GENERATED ALWAYS AS IDENTITY (MINVALUE 0 START WITH 0 CACHE 20) PRIMARY KEY, | |
"uuid" uuid not null, | |
done boolean not null default false, | |
task text not null, | |
due timestamptz | |
); | |
insert into restapi.todos (task, uuid) values | |
('finish tutorial 0', gen_random_uuid() ), ('pat self on back', gen_random_uuid()); | |
commit; | |
select * from restapi.todos; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment