mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-20 02:08:33 -05:00
17 lines
495 B
TypeScript
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")
|
|
}
|