-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from icefoganalytics/main
Ignore latest migration
- Loading branch information
Showing
2 changed files
with
19 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} |
This file was deleted.
Oops, something went wrong.