0340-add-originally-published-at.ts 469 B

12345678910111213141516171819202122232425
  1. import * as Sequelize from 'sequelize'
  2. async function up (utils: {
  3. transaction: Sequelize.Transaction,
  4. queryInterface: Sequelize.QueryInterface,
  5. sequelize: Sequelize.Sequelize
  6. }): Promise<void> {
  7. const data = {
  8. type: Sequelize.DATE,
  9. allowNull: true,
  10. defaultValue: null
  11. }
  12. await utils.queryInterface.addColumn('video', 'originallyPublishedAt', data)
  13. }
  14. function down (options) {
  15. throw new Error('Not implemented.')
  16. }
  17. export {
  18. up,
  19. down
  20. }