This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
seepur/database/migrations/1586374249535_call_schema.js

26 lines
607 B
JavaScript

'use strict'
/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema');
class CallSchema extends Schema {
up() {
this.create('calls', (table) => {
table.increments();
table.string('state').notNullable();
table.bigInteger('parent_id').notNullable();
table.bigInteger('guest_id').notNullable();
table.bigInteger('child_id').notNullable();
table.timestamps();
table.index(['child_id']);
table.index(['parent_id']);
table.index(['guest_id']);
})
}
down() {
this.drop('calls');
}
}
module.exports = CallSchema;