0130-user-autoplay-video.ts 509 B

123456789101112131415161718192021222324252627
  1. import * as Sequelize from 'sequelize'
  2. import * as Promise from 'bluebird'
  3. function up (utils: {
  4. transaction: Sequelize.Transaction,
  5. queryInterface: Sequelize.QueryInterface,
  6. sequelize: Sequelize.Sequelize
  7. }): Promise<void> {
  8. const q = utils.queryInterface
  9. const data = {
  10. type: Sequelize.BOOLEAN,
  11. allowNull: false,
  12. defaultValue: true
  13. }
  14. return q.addColumn('user', 'autoPlayVideo', data)
  15. }
  16. function down (options) {
  17. throw new Error('Not implemented.')
  18. }
  19. export {
  20. up,
  21. down
  22. }