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:
parent
552cc9d646
commit
67bf9b96bb
13 changed files with 162 additions and 73 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue