1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Server: add database field validations

This commit is contained in:
Chocobozzz 2016-12-28 15:49:23 +01:00
parent 552cc9d646
commit 67bf9b96bb
13 changed files with 162 additions and 73 deletions

View file

@ -1,9 +1,15 @@
'use strict'
module.exports = function (sequelize, DataTypes) {
const Application = sequelize.define('Application',
{
migrationVersion: {
type: DataTypes.INTEGER,
defaultValue: 0
defaultValue: 0,
allowNull: false,
validate: {
isInt: true
}
}
},
{