mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-21 15:31:35 +01:00
20 lines
440 B
TypeScript
20 lines
440 B
TypeScript
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
|
|
|
export default class Locations extends BaseSchema {
|
|
protected tableName = 'locations'
|
|
|
|
public async up () {
|
|
this.schema.createTable(this.tableName, (table) => {
|
|
table.increments('id')
|
|
table.string('place')
|
|
table.string('left')
|
|
table.date('since')
|
|
table.timestamps()
|
|
})
|
|
}
|
|
|
|
public async down () {
|
|
this.schema.dropTable(this.tableName)
|
|
}
|
|
}
|