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

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

    public async up() {
        this.schema.alterTable(this.tableName, (table) => {
            table
                .integer('invitor')
                .unsigned()
                .references('id')
                .inTable('users')
                .onDelete('SET NULL')
        })
    }
}
