better / jsonschema2db

Generate tables dynamically from a JSON Schema and insert data

Home Page:https://better.engineering/jsonschema2db/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No tables created

AbdelrahmanAlhaj opened this issue · comments

I have tried the same project with my database configuration using python 3.7.6
when I run the code it's successfully run without any exception but nothing inserted or created on my database.
my output look like bellow:
connected successfully drop schema if exists public cascade create schema public create table "public"."root" (id serial, "loan_file_id" text not null, "prefix" text not null, unique ("loan_file_id", "prefix"), unique (id)) comment on table "public"."root" is %s create table "public"."a_bunch_of_documents" (id serial, "loan_file_id" text not null, "prefix" text not null, "file_id" integer, "root_id" integer, unique ("loan_file_id", "prefix"), unique (id)) comment on table "public"."a_bunch_of_documents" is %s create table "public"."file" (id serial, "loan_file_id" text not null, "prefix" text not null, "url" text, unique ("loan_file_id", "prefix"), unique (id)) comment on table "public"."file" is %s comment on column "public"."file"."url" is %s create table "public"."more_documents" (id serial, "loan_file_id" text not null, "prefix" text not null, "file_id" integer, "root_id" integer, unique ("loan_file_id", "prefix"), unique (id)) update "public"."a_bunch_of_documents" set "file_id" = to_table.id from (select "loan_file_id", "prefix", id from "public"."file") to_table where "public"."a_bunch_of_documents"."loan_file_id" = to_table."loan_file_id" and strpos("public"."a_bunch_of_documents"."prefix", to_table."prefix") = 1 alter table "public"."a_bunch_of_documents" add constraint fk_file_id foreign key ("file_id") references "public"."file" (id) update "public"."a_bunch_of_documents" set "root_id" = to_table.id from (select "loan_file_id", "prefix", id from "public"."root") to_table where "public"."a_bunch_of_documents"."loan_file_id" = to_table."loan_file_id" and strpos("public"."a_bunch_of_documents"."prefix", to_table."prefix") = 1 alter table "public"."a_bunch_of_documents" add constraint fk_root_id foreign key ("root_id") references "public"."root" (id) update "public"."more_documents" set "file_id" = to_table.id from (select "loan_file_id", "prefix", id from "public"."file") to_table where "public"."more_documents"."loan_file_id" = to_table."loan_file_id" and strpos("public"."more_documents"."prefix", to_table."prefix") = 1 alter table "public"."more_documents" add constraint fk_file_id foreign key ("file_id") references "public"."file" (id) update "public"."more_documents" set "root_id" = to_table.id from (select "loan_file_id", "prefix", id from "public"."root") to_table where "public"."more_documents"."loan_file_id" = to_table."loan_file_id" and strpos("public"."more_documents"."prefix", to_table."prefix") = 1 alter table "public"."more_documents" add constraint fk_root_id foreign key ("root_id") references "public"."root" (id) analyze "public"."root" analyze "public"."a_bunch_of_documents" analyze "public"."file" analyze "public"."more_documents" finsih working
Is there any configuration should I add or anything should i do ??