Files
artdanj-api/database/migrations/1608409476823_locations.ts
Arthur DANJOU 404d193b46 Working
Signed-off-by: Arthur DANJOU <arthurdanjou@outlook.fr>
2021-07-01 16:13:22 +02:00

20 lines
460 B
TypeScript
Executable File

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').primary()
table.string('place')
table.string('left')
table.date('since')
table.timestamps(true, true)
})
}
public async down () {
this.schema.dropTable(this.tableName)
}
}