-
-
Save amandeepmittal/9fbc899ebb29f0d245d67ff0257e8eaf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = { | |
up: (queryInterface, Sequelize) => { | |
return queryInterface.createTable('Todos', { | |
id: { | |
allowNull: false, | |
autoIncrement: true, | |
primaryKey: true, | |
type: Sequelize.INTEGER | |
}, | |
title: { | |
type: Sequelize.STRING | |
}, | |
createdAt: { | |
allowNull: false, | |
type: Sequelize.DATE | |
}, | |
updatedAt: { | |
allowNull: false, | |
type: Sequelize.DATE | |
} | |
}); | |
}, | |
down: (queryInterface, Sequelize) => { | |
return queryInterface.dropTable('Todos'); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment