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/1587931580121_activity_log_schema.js

22 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