Files
artdanj-api/database/migrations/1605956543449_files.ts
2021-11-10 12:06:58 +01:00

19 lines
460 B
TypeScript

import BaseSchema from '@ioc:Adonis/Lucid/Schema'
export default class Pictures extends BaseSchema {
protected tableName = 'files'
public async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary()
table.string('label').notNullable()
table.string('file_name').notNullable()
table.timestamps(true, true)
})
}
public async down() {
this.schema.dropTable(this.tableName)
}
}