20170925203055-create-postnotifications-table.js 574 B

12345678910111213141516171819202122232425
  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. charset: 'utf8mb4'
  17. })
  18. },
  19. down: (queryInterface, Sequelize) => {
  20. return queryInterface.dropTable('postnotifications');
  21. }
  22. };