UNPKG

node-ff

Version:
43 lines (40 loc) 921 B
export const 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'); }, }; `;