20170925203055-create-postnotifications-table.js 540 B

1234567891011121314151617181920212223
  1. 'use strict';
  2. module.exports = {
  3. up: (queryInterface, Sequelize) => {
  4. return queryInterface.createTable('postnotifications', {
  5. id: {
  6. type: Sequelize.INTEGER,
  7. primaryKey: true,
  8. autoIncrement: true
  9. },
  10. createdAt: Sequelize.DATE,
  11. updatedAt: Sequelize.DATE,
  12. UserId: Sequelize.INTEGER,
  13. PostId: Sequelize.INTEGER,
  14. NotificationId: Sequelize.INTEGER
  15. })
  16. },
  17. down: (queryInterface, Sequelize) => {
  18. return queryInterface.dropTable('postnotifications');
  19. }
  20. };