From e182466e6603d83baed443f8f02a535a5c0f9e11 Mon Sep 17 00:00:00 2001 From: Liren Tu Date: Fri, 4 Nov 2022 10:35:53 -0700 Subject: [PATCH] Use varchar 255 --- ...rDefinitionNormalizationAndDbtColumns.java | 5 +-- .../configs_database/schema_dump.txt | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/airbyte-db/db-lib/src/main/java/io/airbyte/db/instance/configs/migrations/V0_40_15_001__AddActorDefinitionNormalizationAndDbtColumns.java b/airbyte-db/db-lib/src/main/java/io/airbyte/db/instance/configs/migrations/V0_40_15_001__AddActorDefinitionNormalizationAndDbtColumns.java index 4f8225d504b65..013ce120a9f78 100644 --- a/airbyte-db/db-lib/src/main/java/io/airbyte/db/instance/configs/migrations/V0_40_15_001__AddActorDefinitionNormalizationAndDbtColumns.java +++ b/airbyte-db/db-lib/src/main/java/io/airbyte/db/instance/configs/migrations/V0_40_15_001__AddActorDefinitionNormalizationAndDbtColumns.java @@ -12,7 +12,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -// TODO: update migration description in the class name public class V0_40_15_001__AddActorDefinitionNormalizationAndDbtColumns extends BaseJavaMigration { private static final Logger LOGGER = LoggerFactory.getLogger(V0_40_15_001__AddActorDefinitionNormalizationAndDbtColumns.class); @@ -34,7 +33,7 @@ private void addNormalizationRepositoryColumn(final DSLContext ctx) { ctx.alterTable("actor_definition") .addColumnIfNotExists(DSL.field( "normalization_repository", - SQLDataType.VARCHAR(256).nullable(true))) + SQLDataType.VARCHAR(255).nullable(true))) .execute(); } @@ -42,7 +41,7 @@ private void addNormalizationTagColumn(final DSLContext ctx) { ctx.alterTable("actor_definition") .addColumnIfNotExists(DSL.field( "normalization_tag", - SQLDataType.VARCHAR(256).nullable(true))) + SQLDataType.VARCHAR(255).nullable(true))) .execute(); } diff --git a/airbyte-db/db-lib/src/main/resources/configs_database/schema_dump.txt b/airbyte-db/db-lib/src/main/resources/configs_database/schema_dump.txt index 0f8b27322c228..58c984f8d4086 100644 --- a/airbyte-db/db-lib/src/main/resources/configs_database/schema_dump.txt +++ b/airbyte-db/db-lib/src/main/resources/configs_database/schema_dump.txt @@ -89,6 +89,25 @@ create table "public"."airbyte_configs_migrations"( constraint "airbyte_configs_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, + constraint "attempts_pkey" + primary key ("id") +); create table "public"."connection"( "id" uuid not null, "namespace_definition" namespace_definition_type not null, @@ -128,6 +147,18 @@ create table "public"."connection_operation"( "operation_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 table "public"."operation"( "id" uuid not null, "workspace_id" uuid not null, @@ -277,6 +308,12 @@ create index "actor_oauth_parameter_workspace_definition_idx" on "public"."actor ); create unique index "airbyte_configs_migrations_pk" on "public"."airbyte_configs_migrations"("installed_rank" asc); create index "airbyte_configs_migrations_s_idx" on "public"."airbyte_configs_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 "connection_destination_id_idx" on "public"."connection"("destination_id" asc); create unique index "connection_pkey" on "public"."connection"("id" asc); create index "connection_source_id_idx" on "public"."connection"("source_id" asc); @@ -286,6 +323,7 @@ create unique index "connection_operation_pkey" on "public"."connection_operatio "connection_id" asc, "operation_id" asc ); +create unique index "jobs_pkey" on "public"."jobs"("id" asc); create unique index "operation_pkey" on "public"."operation"("id" asc); create unique index "state__connection_id__stream_name__namespace__uq" on "public"."state"( "connection_id" asc,