summaryrefslogtreecommitdiff
path: root/models/match.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/match.js')
-rw-r--r--models/match.js25
1 files changed, 11 insertions, 14 deletions
diff --git a/models/match.js b/models/match.js
index ec5bdab..d17d769 100644
--- a/models/match.js
+++ b/models/match.js
@@ -8,37 +8,34 @@ module.exports = function(sequelize, DataTypes) {
primaryKey: true,
autoIncrement: true
},
- api_id: {
- type: DataTypes.STRING(191),
- allowNull: false,
- unique: true
- },
shard_id: {
- type: DataTypes.STRING(191),
+ type: DataTypes.STRING(5),
allowNull: false
},
- series: {
- type: DataTypes.STRING(191),
- allowNull: true
+ api_id: {
+ type: DataTypes.CHAR(36),
+ allowNull: false,
+ unique: true
},
created_at: {
type: DataTypes.TIME,
- allowNull: false
+ allowNull: false,
+ defaultValue: sequelize.fn('NOW')
},
duration: {
- type: DataTypes.INTEGER(11),
+ type: DataTypes.INTEGER(5).UNSIGNED,
allowNull: false
},
game_mode: {
- type: DataTypes.STRING(191),
+ type: DataTypes.STRING(16),
allowNull: false
},
end_game_reason: {
- type: DataTypes.STRING(191),
+ type: DataTypes.STRING(16),
allowNull: false
},
queue: {
- type: DataTypes.STRING(191),
+ type: DataTypes.STRING(16),
allowNull: false
}
}, {