9e167724f7
This system will be useful to to update some int video attributes (likes, dislikes, views...) The classic system is not used because we need some optimization for scaling
19 lines
479 B
JavaScript
19 lines
479 B
JavaScript
'use strict'
|
|
|
|
// utils = { transaction, queryInterface, sequelize, Sequelize }
|
|
exports.up = function (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)
|
|
}
|
|
|
|
exports.down = function (options, callback) {
|
|
throw new Error('Not implemented.')
|
|
}
|