]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/models/application.js
ec1d7b1227c70bf1ce8f3254a2e59e16afc699d6
1 module
.exports = function (sequelize
, DataTypes
) {
2 const Application
= sequelize
.define('Application',
5 type: DataTypes
.INTEGER
,
12 updateSqlSchemaVersion
20 // ---------------------------------------------------------------------------
22 function loadSqlSchemaVersion (callback
) {
24 attributes: [ 'sqlSchemaVersion' ]
27 return this.findOne(query
).asCallback(function (err
, data
) {
28 const version
= data
? data
.sqlSchemaVersion : 0
30 return callback(err
, version
)
34 function updateSqlSchemaVersion (newVersion
, callback
) {
35 return this.update({ sqlSchemaVersion: newVersion
}).asCallback(callback
)