0ms elapsed
Table [migration]
1 rows returned
created | idx | src | title |
---|---|---|---|
1 | ---- -- drop table if exists "item"; -- -- drop table if exists "collection"; -- -- -- -- -- create table if not exists "collection" ( "id" uuid not null, "name" text not null, "created" timestamp not null default current_timestamp, primary key ("id") ); -- -- create table if not exists "item" ( "id" uuid not null, "collection_id" uuid not null, "name" text not null, "created" timestamp not null default current_timestamp, foreign key ("collection_id") references "collection" ("id"), primary key ("id") ); create index if not exists "item__collection_id_idx" on "item" ("collection_id"); -- -- -- -- insert into "collection" ( "id", "name", "created" ) values ( '10000000-0000-0000-0000-000000000000', 'Test Collection', current_timestamp ) on conflict do nothing; -- -- insert into "item" ( "id", "collection_id", "name", "created" ) values ( '10000000-0000-0000-0000-000000000001', '10000000-0000-0000-0000-000000000000', 'Test Item', current_timestamp ) on conflict do nothing; -- -- -- | create initial database |