mirror of
https://github.com/sergeyyarkov/educt-server.git
synced 2026-10-12 02:39:09 +03:00
31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
"use strict";
|
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const Schema_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Lucid/Schema"));
|
|
class Roles extends Schema_1.default {
|
|
constructor() {
|
|
super(...arguments);
|
|
Object.defineProperty(this, "tableName", {
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true,
|
|
value: 'roles'
|
|
});
|
|
}
|
|
async up() {
|
|
this.schema.createTable(this.tableName, table => {
|
|
table.increments('id').primary();
|
|
table.string('name').notNullable();
|
|
table.string('slug').unique().notNullable();
|
|
table.timestamp('created_at', { useTz: true });
|
|
table.timestamp('updated_at', { useTz: true });
|
|
});
|
|
}
|
|
async down() {
|
|
this.schema.dropTable(this.tableName);
|
|
}
|
|
}
|
|
exports.default = Roles;
|
|
//# sourceMappingURL=1626964029348_roles.js.map
|