sendou.ink/migrations/20200906150322_create_users_table.ts
2020-09-09 16:43:05 +03:00

17 lines
495 B
TypeScript

import * as Knex from "knex"
export async function up(knex: Knex): Promise<void> {
return knex.schema.createTable("users", function (table) {
table.increments()
table.string("username", 32).notNullable()
table.string("discriminator", 4).notNullable()
table.string("discord_id", 18).notNullable().unique()
table.string("discord_avatar")
//table.string('avatar');
})
}
export async function down(knex: Knex): Promise<void> {
return knex.schema.dropTable("users")
}