Files
portfolio2023/build/database/migrations/1701712115317_users.js
T
Tutur33 977386f605 build
2023-12-06 22:34:07 +01:00

29 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 default_1 extends Schema_1.default {
constructor() {
super(...arguments);
this.tableName = 'users';
}
async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary();
table.string('pseudo', 50).notNullable();
table.string('email', 255).notNullable().unique();
table.string('password', 180).notNullable();
table.json('avatar');
table.string('remember_me_token').nullable();
table.timestamp('created_at', { useTz: true }).notNullable();
table.timestamp('updated_at', { useTz: true }).notNullable();
});
}
async down() {
this.schema.dropTable(this.tableName);
}
}
exports.default = default_1;
//# sourceMappingURL=1701712115317_users.js.map