Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | import * as Knex from "knex"; export async function up(knex: Knex): Promise<any> { return knex.schema.createTable("users", table => { table.string("id").primary(); table.string("username").nullable(); table.string("email").nullable(); table.string("phone").nullable(); table.dateTime("deletedAt").nullable(); table.dateTime("updatedAt").notNullable(); table.dateTime("createdAt").notNullable(); table.unique(["username"]); table.unique(["email"]); table.unique(["phone"]); }); } export async function down(knex: Knex): Promise<any> { return knex.schema.dropTable("users"); } |