Skip to content

Commit

Permalink
Use varchar 255
Browse files Browse the repository at this point in the history
  • Loading branch information
tuliren committed Nov 4, 2022
1 parent cb75eb5 commit e182466
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -34,15 +33,15 @@ 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();
}

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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand All @@ -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,
Expand Down

0 comments on commit e182466

Please sign in to comment.