Skip to content

Instantly share code, notes, and snippets.

@amandeepmittal
Created December 3, 2018 04:35
Show Gist options
  • Save amandeepmittal/9fbc899ebb29f0d245d67ff0257e8eaf to your computer and use it in GitHub Desktop.
Save amandeepmittal/9fbc899ebb29f0d245d67ff0257e8eaf to your computer and use it in GitHub Desktop.
'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