seepur/database/migrations/1587931580121_activity_log_schema.js

23 lines
541 B
JavaScript

'use strict'
/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema')
class ActivityLogSchema extends Schema {
up() {
this.create('activity_logs', (table) => {
table.increments();
table.bigInteger('call_id').notNullable();
table.string('type', 60).notNullable();
table.bigInteger('resource_id').notNullable();
table.timestamps(); // created_at = start time, updated_at = end time
});
}
down() {
this.drop('activity_logs');
}
}
module.exports = ActivityLogSchema