Add maintenance mode and update announce

This commit is contained in:
2021-08-23 14:38:14 +02:00
parent bbebdf681d
commit 0c70b340a9
7 changed files with 97 additions and 29 deletions

View File

@@ -0,0 +1,22 @@
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
export default class Maintenances extends BaseSchema {
protected tableName = 'maintenances'
public async up () {
this.schema.createTable(this.tableName, (table) => {
table.increments('id')
table.boolean('active').defaultTo(false).notNullable()
table
.integer('reason_id')
.unsigned()
.references('translations.id')
.onDelete('CASCADE')
table.timestamps(true, true)
})
}
public async down () {
this.schema.dropTable(this.tableName)
}
}