import BaseSchema from '@ioc:Adonis/Lucid/Schema'

export default class extends BaseSchema {
    protected tableName = 'properties'

    public async up() {
        this.schema.createTable(this.tableName, (table) => {
            table.string('id', 72).primary()
            table.datetime('created_at', { useTz: true })
            table.datetime('updated_at', { useTz: true })
            table.string('name')
            table.string('value')
            table.string('type').nullable()
        })
    }

    public async down() {
        this.schema.dropTable(this.tableName)
    }
}
