1
0
Fork 0

Server: add unique to unique indexes

This commit is contained in:
Chocobozzz 2017-02-16 19:24:34 +01:00
parent 4793c343fd
commit 5d67f289df
3 changed files with 10 additions and 3 deletions

View file

@ -25,7 +25,12 @@ module.exports = function (sequelize, DataTypes) {
fields: [ 'podId' ]
},
{
fields: [ 'userId' ]
fields: [ 'userId' ],
unique: true
},
{
fields: [ 'name', 'podId' ],
unique: true
}
],
classMethods: {

View file

@ -41,7 +41,8 @@ module.exports = function (sequelize, DataTypes) {
{
indexes: [
{
fields: [ 'host' ]
fields: [ 'host' ],
unique: true
},
{
fields: [ 'score' ]

View file

@ -40,7 +40,8 @@ module.exports = function (sequelize, DataTypes) {
{
indexes: [
{
fields: [ 'username' ]
fields: [ 'username' ],
unique: true
}
],
classMethods: {