Files
artdanj-api/database/migrations/1608415261417_projects.ts
Arthur DANJOU ed17d86913 Working
Signed-off-by: Arthur DANJOU <arthurdanjou@outlook.fr>
2021-08-05 13:41:57 +02:00

21 lines
496 B
TypeScript

import BaseSchema from '@ioc:Adonis/Lucid/Schema'
export default class Projects extends BaseSchema {
protected tableName = 'projects'
public async up () {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary()
table.string('name')
table.string('description')
table.string('url')
table.integer('progress')
table.timestamps(true, true)
})
}
public async down () {
this.schema.dropTable(this.tableName)
}
}