aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/author.js7
-rw-r--r--server/models/pod.js3
-rw-r--r--server/models/user.js3
3 files changed, 10 insertions, 3 deletions
diff --git a/server/models/author.js b/server/models/author.js
index 7d15fb6ec..f036193c8 100644
--- a/server/models/author.js
+++ b/server/models/author.js
@@ -25,7 +25,12 @@ module.exports = function (sequelize, DataTypes) {
25 fields: [ 'podId' ] 25 fields: [ 'podId' ]
26 }, 26 },
27 { 27 {
28 fields: [ 'userId' ] 28 fields: [ 'userId' ],
29 unique: true
30 },
31 {
32 fields: [ 'name', 'podId' ],
33 unique: true
29 } 34 }
30 ], 35 ],
31 classMethods: { 36 classMethods: {
diff --git a/server/models/pod.js b/server/models/pod.js
index 6ae4b0999..575ebbc61 100644
--- a/server/models/pod.js
+++ b/server/models/pod.js
@@ -41,7 +41,8 @@ module.exports = function (sequelize, DataTypes) {
41 { 41 {
42 indexes: [ 42 indexes: [
43 { 43 {
44 fields: [ 'host' ] 44 fields: [ 'host' ],
45 unique: true
45 }, 46 },
46 { 47 {
47 fields: [ 'score' ] 48 fields: [ 'score' ]
diff --git a/server/models/user.js b/server/models/user.js
index 36ed723cc..6cb9eec3f 100644
--- a/server/models/user.js
+++ b/server/models/user.js
@@ -40,7 +40,8 @@ module.exports = function (sequelize, DataTypes) {
40 { 40 {
41 indexes: [ 41 indexes: [
42 { 42 {
43 fields: [ 'username' ] 43 fields: [ 'username' ],
44 unique: true
44 } 45 }
45 ], 46 ],
46 classMethods: { 47 classMethods: {