Skip to content

Commit

Permalink
Fixing varchar2 overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
datajohnson committed Jun 25, 2024
1 parent abae315 commit bae796c
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion api/src/data/migrations/003.create-departments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function up(knex: knex.Knex) {
await knex.schema.createTable("departments", function(table) {
table.string("code", 8).primary().notNullable();
table.string("name", 256).notNullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
});
};

Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/004.create-locations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function up(knex: knex.Knex) {
await knex.schema.createTable("locations", function(table) {
table.string("code", 8).primary().notNullable();
table.string("name", 256).notNullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
});
};

Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/005.create-scopes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function up(knex: knex.Knex) {
await knex.schema.createTable("scopes", function(table) {
table.string("code", 8).primary().notNullable();
table.string("name", 256).notNullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
});
};

Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/006.create-sensitivities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function up(knex: knex.Knex) {
await knex.schema.createTable("sensitivities", function(table) {
table.string("code", 8).primary().notNullable();
table.string("name", 256).notNullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
});
};

Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/007.create-role-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function up(knex: knex.Knex) {
table.increments("id").primary().notNullable();
table.string("name", 256).notNullable();
table.integer("permissions").notNullable();
table.string("description", 4096).notNullable();
table.string("description", 4000).notNullable();
});
};

Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/009.create-action-statuses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function up(knex: knex.Knex) {
await knex.schema.createTable("action_statuses", function(table) {
table.string("code", 8).primary().notNullable();
table.string("name", 256).notNullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
});
};

Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/010.create-hazard-statuses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function up(knex: knex.Knex) {
await knex.schema.createTable("hazard_statuses", function(table) {
table.string("code", 8).primary().notNullable();
table.string("name", 256).notNullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
});
};

Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/011.create-incident-statuses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function up(knex: knex.Knex) {
await knex.schema.createTable("incident_statuses", function(table) {
table.string("code", 8).primary().notNullable();
table.string("name", 256).notNullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
});
};

Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/012.create-action-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function up(knex: knex.Knex) {
await knex.schema.createTable("action_types", function(table) {
table.string("code", 8).primary().notNullable();
table.string("name", 256).notNullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
});
};

Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/013.create-hazard-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function up(knex: knex.Knex) {
table.integer("create_user_id").notNullable();
table.integer("searchable_user_id").nullable();
table.string("name", 256).notNullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
table.boolean("is_searchable").notNullable().defaultTo(true);
table.datetime("created_at").nullable().defaultTo(knex.fn.now());
table.date("searchable_on").nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function up(knex: knex.Knex) {
await knex.schema.createTable("incident_hazard_types", function(table) {
table.string("code", 8).primary().notNullable();
table.string("name", 256).notNullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
});
};

Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/015.create-incident-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function up(knex: knex.Knex) {
table.integer("create_user_id").nullable();
table.integer("searchable_user_id").nullable();
table.string("name", 256).notNullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
table.boolean("is_searchable").notNullable().defaultTo(true);
table.datetime("created_at").nullable().defaultTo(knex.fn.now());
table.date("searchable_on").nullable();
Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/016.create-incidents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function up(knex: knex.Knex) {
table.string("reporting_person_email", 250).nullable();
table.string("supervisor_email", 250).nullable();
table.integer("proxy_user_id").nullable();
table.string("description", 4096).notNullable();
table.string("description", 4000).notNullable();
table.datetime("created_at").notNullable().defaultTo(knex.fn.now());

table.foreign("sensitivity_code").references("sensitivities.code");
Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/017.create-hazards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function up(knex: knex.Knex) {
table.string("scope_code", 8).nullable();
table.string("status_code", 8).nullable();
table.string("sensitivity_code", 8).nullable();
table.string("description", 4096).nullable();
table.string("description", 4000).nullable();
table.string("location_detail", 1000).nullable();
table.datetime("created_at").nullable().defaultTo(knex.fn.now());
table.integer("reopen_count").notNullable().defaultTo(0);
Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/019.create-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function up(knex: knex.Knex) {
table.datetime("created_at").notNullable().defaultTo(knex.fn.now());
table.datetime("modified_at").nullable().defaultTo(knex.fn.now());
table.datetime("due_date").nullable();
table.string("description", 4096).notNullable();
table.string("description", 4000).notNullable();
table.string("action_type_code", 8).notNullable();
table.string("sensitivity_code", 8).nullable();
table.string("status_code", 8).nullable();
Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/020.create-role-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function up(knex: knex.Knex) {
table.integer("changer_user_id").nullable();
table.integer("changer_role_id").nullable();
table.datetime("changed_date").notNullable(); // defaultTo now?
table.string("log_comment", 4096).notNullable();
table.string("log_comment", 4000).notNullable();
table.string("user_action", 8).notNullable();

table.foreign("user_roles_id").references("user_roles.id");
Expand Down
6 changes: 3 additions & 3 deletions api/src/data/migrations/021.create-hazard-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function up(knex: knex.Knex) {
table.increments("id").primary().notNullable();
table.integer("hazard_id").notNullable();
table.integer("old_hazard_type_id").notNullable();
table.string("old_description", 4096).nullable();
table.string("old_description", 4000).nullable();
table.string("old_location_code", 8).nullable();
table.string("old_location_detail", 8).nullable();
table.string("old_department_code", 8).nullable();
Expand All @@ -14,7 +14,7 @@ export async function up(knex: knex.Knex) {
table.string("old_status_code", 8).nullable();
table.integer("old_reopen_count").notNullable();
table.integer("new_hazard_type_id").notNullable();
table.string("new_description", 4096).nullable();
table.string("new_description", 4000).nullable();
table.string("new_location_code", 8).nullable();
table.string("new_location_detail", 8).nullable();
table.string("new_department_code", 8).nullable();
Expand All @@ -25,7 +25,7 @@ export async function up(knex: knex.Knex) {
table.integer("changer_user_id").nullable();
table.integer("changer_role_id").nullable();
table.datetime("changed_date").notNullable();
table.string("log_comment", 4096).notNullable();
table.string("log_comment", 4000).notNullable();
table.string("user_action", 8).notNullable();

table.foreign("hazard_id").references("hazards.id");
Expand Down
6 changes: 3 additions & 3 deletions api/src/data/migrations/022.create-action-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ export async function up(knex: knex.Knex) {
table.integer("old_actor_user_id").nullable();
table.integer("old_actor_role_id").nullable();
table.datetime("old_due_date").notNullable();
table.string("old_description", 4096).notNullable();
table.string("old_description", 4000).notNullable();
table.string("old_action_type_code", 8).notNullable();
table.string("old_sensitivity_code", 8).nullable();
table.string("old_status_code", 8).nullable();
table.integer("new_actor_user_id").nullable();
table.integer("new_actor_role_id").nullable();
table.datetime("new_due_date").notNullable();
table.string("new_description", 4096).notNullable();
table.string("new_description", 4000).notNullable();
table.string("new_action_type_code", 8).notNullable();
table.string("new_sensitivity_code", 8).nullable();
table.string("new_status_code", 8).nullable();
table.integer("changer_user_id").nullable();
table.integer("changer_role_id").nullable();
table.datetime("changed_date").notNullable();
table.string("log_comment", 4096).notNullable();
table.string("log_comment", 4000).notNullable();
table.string("user_action", 8).notNullable();

table.foreign("action_id").references("actions.id");
Expand Down
6 changes: 3 additions & 3 deletions api/src/data/migrations/023.create-incident-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ export async function up(knex: knex.Knex) {
await knex.schema.createTable("incident_logs", function(table) {
table.increments("id").primary().notNullable();
table.integer("incident_id").notNullable();
table.string("old_description", 4096).notNullable();
table.string("old_description", 4000).notNullable();
table.string("old_sensitivity_code", 256).nullable();
table.string("old_supervisor", 8).nullable();
table.datetime("old_created_date").notNullable();
table.string("old_status_code", 8).nullable();
table.integer("old_incident_type_id").nullable();
table.string("new_description", 4096).notNullable();
table.string("new_description", 4000).notNullable();
table.string("new_supervisor", 8).nullable();
table.string("new_sensitivity_code", 8).nullable();
table.datetime("new_created_date").notNullable();
Expand All @@ -19,7 +19,7 @@ export async function up(knex: knex.Knex) {
table.integer("changer_user_id").nullable();
table.integer("changer_role_id").nullable();
table.datetime("changed_date").notNullable();
table.string("log_comment", 4096).notNullable();
table.string("log_comment", 4000).notNullable();
table.string("user_action", 8).notNullable();

table.foreign("incident_id").references("incidents.id");
Expand Down
2 changes: 1 addition & 1 deletion api/src/data/migrations/024.create-incident-hazard-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function up(knex: knex.Knex) {
table.integer("changer_user_id").nullable();
table.integer("changer_role_id").nullable();
table.datetime("changed_date").notNullable();
table.string("log_comment", 4096).notNullable();
table.string("log_comment", 4000).notNullable();
table.string("user_action", 8).notNullable();

table.foreign("incident_hazard_id").references("incident_hazards.id");
Expand Down

0 comments on commit bae796c

Please sign in to comment.