0045-user-display-nsfw.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: false
  13. }
  14. return q.addColumn('Users', 'displayNSFW', data)
  15. }
  16. function down (options) {
  17. throw new Error('Not implemented.')
  18. }
  19. export {
  20. up,
  21. down
  22. }