API/api.medcify.app/migrations/20220121061844-create-users.js

70 lines
1.4 KiB
JavaScript
Raw Permalink Normal View History

2022-09-26 06:11:44 +00:00
'use strict';
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable('users', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
userType: {
type: Sequelize.INTEGER
},
name: {
type: Sequelize.STRING
},
image:{
type: Sequelize.TEXT
},
referralDoctor: {
type: Sequelize.STRING
},
email: {
type: Sequelize.STRING
},
contactNumber: {
type: Sequelize.STRING
},
whatsAppNumber: {
type: Sequelize.STRING
},
address1: {
type: Sequelize.STRING
},
address2: {
type: Sequelize.STRING
},
pincode: {
type: Sequelize.INTEGER
},
location: {
type: Sequelize.STRING
},
username: {
type: Sequelize.STRING
},
deviceId: {
type: Sequelize.STRING
},
password: {
type: Sequelize.STRING
},
status: {
type: Sequelize.INTEGER
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
async down(queryInterface, Sequelize) {
await queryInterface.dropTable('users');
}
};