The fields in the second table correspond to the top-level properties found in the array of blocks in a Logseq export. Following are SQL statements to create two tables in Postgres:\n- Create table to store Logseq exports create table export ( id bigint generated by default as identity primary key, inserted_at timestamp with time zone default timezone(\u0026#39 utc\u0026#39 ::text, now()) not null, name varchar(255) not null, type varchar(255) not null, size bigint not null, last_modified bigint not null, data jsonb not null ) - Create table to extract export page blocks create table page ( id uuid primary key, \u0026#34 page-name\u0026#34 text, properties jsonb, format text, children jsonb ) The first table is for uploading JSON data and related metadata, and the other is going to be used for storing extracts of the data. However, we want to define our tables in code so their creation can be repeated without having to remember how it was done. The endpoint is configured to extract meaningful file metadata, parse the JSON inside the file and insert them into a table named export in Postgres, which we\u0026rsquo ll create next.\nDefine Tables in Postgres Since we\u0026rsquo re using Supabase creating tables in Postgres can be achieved using the table editor UI built for the purpose. Roger rabbit movie free download, Orange partnership for alcohol and drug free youth. You will need to install it as a dependency in your SvelteKit project in order to be able to import it as shown in the page endpoint above. [ Here supabase is the supabase-js client.
0 Comments
Leave a Reply. |