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/1578967458389_link_schema.js

25 lines
480 B
JavaScript
Raw Normal View History

'use strict'
/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema')
class LinkSchema extends Schema {
2020-03-17 22:16:34 +00:00
up() {
this.create('links', (table) => {
table.increments();
table.bigInteger('user_id');
table.bigInteger('child_id');
table.boolean('is_parent');
table.timestamps();
table.index(['user_id']);
table.index(['child_id']);
})
}
2020-03-17 22:16:34 +00:00
down() {
this.drop('links')
}
}
module.exports = LinkSchema