1
0
Fork 0
peertube/server/initializers/migrations/0015-video-views.ts

23 lines
470 B
TypeScript
Raw Normal View History

// utils = { transaction, queryInterface, sequelize, Sequelize }
2017-05-15 16:22:03 -04:00
function up (utils, finalCallback) {
const q = utils.queryInterface
const Sequelize = utils.Sequelize
const data = {
type: Sequelize.INTEGER,
allowNull: false,
defaultValue: 0
}
q.addColumn('Videos', 'views', data, { transaction: utils.transaction }).asCallback(finalCallback)
}
2017-05-15 16:22:03 -04:00
function down (options, callback) {
throw new Error('Not implemented.')
}
2017-05-15 16:22:03 -04:00
export {
up,
down
}