Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- module.exports = {
- up: (queryInterface, Sequelize) => {
- return queryInterface.createTable('users', {
- id: {
- type: Sequelize.INTEGER,
- allowNull: false,
- autoIncrement: true,
- primaryKey: true
- },
- name: {
- type: Sequelize.STRING,
- allowNull: false
- },
- email: {
- type: Sequelize.STRING,
- allowNull: false,
- unique: true
- },
- password_hash: {
- type: Sequelize.STRING,
- allowNull: false
- },
- provider: {
- type: Sequelize.BOOLEAN,
- defaultValue: false,
- allowNull: false
- },
- created_at: {
- type: Sequelize.DATE,
- allowNull: false
- },
- updated_at: {
- type: Sequelize.DATE,
- allowNull: false
- }
- });
- },
- down: queryInterface => {
- return queryInterface.dropTable('users');
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement