Skip to content

Commit

Permalink
Ignore latest migration
Browse files Browse the repository at this point in the history
  • Loading branch information
datajohnson committed Jul 30, 2024
1 parent 8bf08b4 commit 13c9fbd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 37 deletions.
41 changes: 19 additions & 22 deletions api/src/data/migrations/001.create-users-table.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
import * as knex from "knex";

export async function up(knex: knex.Knex) {
await knex.schema.createTable("users", function(table) {
table.increments("id").notNullable().primary();
table.string("email", 250).notNullable();
table.string("auth_subject", 250).notNullable();
table.string("first_name", 100);
table.string("last_name", 100);
table.string("display_name", 200);
table.string("title", 100);
table.string("department", 100);
table.string("division", 100);
table.string("branch", 100);
table.string("unit", 100);
table.boolean("is_active").defaultTo(true).notNullable();
await knex.schema.createTable("users", function (table) {
table.increments("id").notNullable().primary();
table.string("email", 250).notNullable();
table.string("auth_subject", 250).notNullable();
table.string("first_name", 100);
table.string("last_name", 100);
table.string("display_name", 200);
table.string("title", 100);
table.string("department", 100);
table.string("division", 100);
table.string("branch", 100);
table.string("unit", 100);
table.boolean("is_active").defaultTo(true).notNullable();

table.unique(["email"], {
indexName: "unique_users_email",
});
table.unique(["auth_subject"], {
indexName: "unique_users_auth_subject",
});
table.unique(["email"], {
indexName: "unique_users_email",
});
};
});
}

export async function down(knex: knex.Knex) {
await knex.schema.dropTable("users");
};
await knex.schema.dropTable("users");
}
15 changes: 0 additions & 15 deletions api/src/data/migrations/029.drop_auth_index.ts

This file was deleted.

0 comments on commit 13c9fbd

Please sign in to comment.