// The content of the file is just to have a basic idea of the current state of the database and is not fully accurate. 
// It is also not used by any piece of code to generate anything. 
// It doesn't contain the enums created in the database and the default values might also be buggy. 

create table "public"."airbyte_jobs_migrations"(
  "installed_rank" int4 not null,
  "version" varchar(50) null,
  "description" varchar(200) not null,
  "type" varchar(20) not null,
  "script" varchar(1000) not null,
  "checksum" int4 null,
  "installed_by" varchar(100) not null,
  "installed_on" timestamp(29) not null default null,
  "execution_time" int4 not null,
  "success" bool not null,
  constraint "airbyte_jobs_migrations_pk"
    primary key ("installed_rank")
);
create table "public"."airbyte_metadata"(
  "key" varchar(255) not null,
  "value" varchar(255) null,
  constraint "airbyte_metadata_pkey"
    primary key ("key")
);
create table "public"."attempts"(
  "id" int8 generated by default as identity not null,
  "job_id" int8 null,
  "attempt_number" int4 null,
  "log_path" varchar(255) null,
  "output" jsonb null,
  "status" any null,
  "created_at" timestamptz(35) null,
  "updated_at" timestamptz(35) null,
  "ended_at" timestamptz(35) null,
  "temporal_workflow_id" varchar(256) null,
  "failure_summary" jsonb null,
  constraint "attempts_pkey"
    primary key ("id")
);
create table "public"."jobs"(
  "id" int8 generated by default as identity not null,
  "config_type" any null,
  "scope" varchar(255) null,
  "config" jsonb null,
  "status" any null,
  "started_at" timestamptz(35) null,
  "created_at" timestamptz(35) null,
  "updated_at" timestamptz(35) null,
  constraint "jobs_pkey"
    primary key ("id")
);
create unique index "airbyte_jobs_migrations_pk" on "public"."airbyte_jobs_migrations"("installed_rank" asc);
create index "airbyte_jobs_migrations_s_idx" on "public"."airbyte_jobs_migrations"("success" asc);
create unique index "airbyte_metadata_pkey" on "public"."airbyte_metadata"("key" asc);
create unique index "attempts_pkey" on "public"."attempts"("id" asc);
create unique index "job_attempt_idx" on "public"."attempts"(
  "job_id" asc, 
  "attempt_number" asc
);
create index "jobs_config_type_idx" on "public"."jobs"("config_type" asc);
create unique index "jobs_pkey" on "public"."jobs"("id" asc);
create index "jobs_scope_idx" on "public"."jobs"("scope" asc);
