Files
artdanj-api/database/migrations/1628110081266_translations.ts

20 lines
542 B
TypeScript

import BaseSchema from '@ioc:Adonis/Lucid/Schema'
export default class Translations extends BaseSchema {
protected tableName = 'translations'
public async up () {
this.schema.createTable(this.tableName, (table) => {
table.increments('id')
table.string('code').notNullable()
table.string('french').defaultTo('Traduction manquante')
table.string('english').defaultTo('Missing translation')
table.timestamps(true, true)
})
}
public async down () {
this.schema.dropTable(this.tableName)
}
}