Untitled

mail@pastecode.io avatar
unknown
plain_text
22 days ago
731 B
6
Indexable
Never
//user
module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.createTable('users', {
      id: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        allowNull: false,
        autoIncrement: true
      },      
      displayName: {
        type: Sequelize.STRING,
        field: 'display_name',
        allowNull: false
      },
      email: {
        type: Sequelize.STRING(255),
      },
      password: {
        allowNull: false,
        type: Sequelize.STRING(255)
      },
      image: {
        allowNull: true,
        type: Sequelize.STRING(255)
      },      
    });
  },
  down: async (queryInterface, _Sequelize) => {
    await queryInterface.dropTable('users');
  },
};
Leave a Comment