0280-webtorrent-policy-user.ts 650 B

12345678910111213141516171819202122232425262728
  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<any> {
  7. {
  8. const data = {
  9. type: Sequelize.BOOLEAN,
  10. allowNull: false,
  11. defaultValue: true
  12. }
  13. await utils.queryInterface.addColumn('user', 'webTorrentEnabled', data)
  14. }
  15. }
  16. async function down (utils: {
  17. transaction: Sequelize.Transaction
  18. queryInterface: Sequelize.QueryInterface
  19. sequelize: Sequelize.Sequelize
  20. }): Promise<any> {
  21. await utils.queryInterface.removeColumn('user', 'webTorrentEnabled')
  22. }
  23. export { up, down }