node-ff
Version:
A CLI for creating NodeJs projects
46 lines (44 loc) • 1.07 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.user_migration = void 0;
exports.user_migration = `
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, DataTypes) {
return queryInterface.createTable('Users', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: DataTypes.INTEGER,
},
name: {
allowNull: false,
type: DataTypes.STRING,
},
email: {
allowNull: false,
type: DataTypes.STRING,
unique: true,
},
password: {
allowNull: false,
type: DataTypes.STRING,
},
createdAt: {
allowNull: false,
type: DataTypes.DATE,
},
updatedAt: {
allowNull: false,
type: DataTypes.DATE,
},
});
},
async down(queryInterface) {
return queryInterface.dropTable('Users');
},
};
`;
//# sourceMappingURL=user_migration.js.map