mirror of
https://github.com/ArthurDanjou/artdanj-shortener.git
synced 2026-01-14 15:54:08 +01:00
19 lines
468 B
TypeScript
Executable File
19 lines
468 B
TypeScript
Executable File
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
|
|
|
export default class UsersSchema extends BaseSchema {
|
|
protected tableName = 'users'
|
|
|
|
public async up () {
|
|
this.schema.createTable(this.tableName, (table) => {
|
|
table.increments('id').primary()
|
|
table.string('email', 255).notNullable()
|
|
table.string('password', 180).notNullable()
|
|
table.timestamps(true)
|
|
})
|
|
}
|
|
|
|
public async down () {
|
|
this.schema.dropTable(this.tableName)
|
|
}
|
|
}
|