summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-07-27 13:30:46 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-07-27 13:30:46 +0200
commitd6e50e21163c90b7263c9ed1b09a5a39073f7006 (patch)
tree9943dc74b64cf615f7098b87426bfd94db216d69
parentf53e7393d3520b6a81b09ddf95640a1b74743e13 (diff)
downloadorm-d6e50e21163c90b7263c9ed1b09a5a39073f7006.tar.gz
orm-d6e50e21163c90b7263c9ed1b09a5a39073f7006.zip
-rw-r--r--models/global_point.js4
-rw-r--r--models/player_point.js6
-rw-r--r--models/tournament.js16
-rw-r--r--models/tournament_participants.js8
-rw-r--r--models/users.js16
5 files changed, 30 insertions, 20 deletions
diff --git a/models/global_point.js b/models/global_point.js
index 4287abf..38b1920 100644
--- a/models/global_point.js
+++ b/models/global_point.js
@@ -60,6 +60,10 @@ module.exports = function(sequelize, DataTypes) {
type: DataTypes.BIGINT,
allowNull: true
},
+ trueskill_delta: {
+ type: "DOUBLE",
+ allowNull: true
+ },
time_spent: {
type: DataTypes.BIGINT,
allowNull: true
diff --git a/models/player_point.js b/models/player_point.js
index ea1d9cc..229d00a 100644
--- a/models/player_point.js
+++ b/models/player_point.js
@@ -48,7 +48,11 @@ module.exports = function(sequelize, DataTypes) {
type: DataTypes.BIGINT,
allowNull: false
},
- trueskill: {
+ trueskill_max: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ trueskill_delta: {
type: "DOUBLE",
allowNull: true
},
diff --git a/models/tournament.js b/models/tournament.js
index 27de855..56ca5cf 100644
--- a/models/tournament.js
+++ b/models/tournament.js
@@ -16,14 +16,6 @@ module.exports = function(sequelize, DataTypes) {
type: DataTypes.STRING(191),
allowNull: false
},
- tag_line_1: {
- type: DataTypes.STRING(191),
- allowNull: true
- },
- tag_line_2: {
- type: DataTypes.STRING(191),
- allowNull: true
- },
status: {
type: DataTypes.ENUM('planned','active','finished'),
allowNull: false
@@ -43,6 +35,14 @@ module.exports = function(sequelize, DataTypes) {
region: {
type: DataTypes.STRING(191),
allowNull: true
+ },
+ tag_line_1: {
+ type: DataTypes.STRING(255),
+ allowNull: true
+ },
+ tag_line_2: {
+ type: DataTypes.STRING(255),
+ allowNull: true
}
}, {
tableName: 'tournament',
diff --git a/models/tournament_participants.js b/models/tournament_participants.js
index 284ca42..092f8a8 100644
--- a/models/tournament_participants.js
+++ b/models/tournament_participants.js
@@ -16,13 +16,13 @@ module.exports = function(sequelize, DataTypes) {
type: DataTypes.BIGINT,
allowNull: false
},
- role_id: {
- type: DataTypes.BIGINT,
- allowNull: false
- },
player_api_id: {
type: DataTypes.CHAR(36),
allowNull: false
+ },
+ role_id: {
+ type: DataTypes.INTEGER(11),
+ allowNull: true
}
}, {
tableName: 'tournament_participants',
diff --git a/models/users.js b/models/users.js
index b82ba74..853e441 100644
--- a/models/users.js
+++ b/models/users.js
@@ -14,22 +14,24 @@ module.exports = function(sequelize, DataTypes) {
},
user_token: {
type: DataTypes.CHAR(36),
- allowNull: true
+ allowNull: false,
+ defaultValue: '-1'
},
player_api_id: {
type: DataTypes.CHAR(36),
- allowNull: true
+ allowNull: true,
+ defaultValue: ''
},
email: {
- type: DataTypes.STRING(191),
- allowNull: false
+ type: DataTypes.STRING(100),
+ allowNull: true
},
password: {
- type: DataTypes.STRING(191),
- allowNull: false
+ type: DataTypes.STRING(100),
+ allowNull: true
},
remember_token: {
- type: DataTypes.STRING(191),
+ type: DataTypes.STRING(255),
allowNull: true
},
access_type: {