diff options
Diffstat (limited to 'models')
| -rw-r--r-- | models/asset.js | 2 | ||||
| -rw-r--r-- | models/global_point.js | 4 | ||||
| -rw-r--r-- | models/match.js | 2 | ||||
| -rw-r--r-- | models/participant.js | 2 | ||||
| -rw-r--r-- | models/participant_phases.js | 14 | ||||
| -rw-r--r-- | models/team.js | 2 | ||||
| -rw-r--r-- | models/team_membership.js | 2 | ||||
| -rw-r--r-- | models/tournament.js | 16 | ||||
| -rw-r--r-- | models/tournament_participants.js | 8 | ||||
| -rw-r--r-- | models/users.js | 16 |
10 files changed, 35 insertions, 33 deletions
diff --git a/models/asset.js b/models/asset.js index bc60b3e..32382a2 100644 --- a/models/asset.js +++ b/models/asset.js @@ -36,7 +36,7 @@ module.exports = function(sequelize, DataTypes) { created_at: { type: DataTypes.TIME, allowNull: false, - defaultValue: sequelize.fn('current_timestamp') + defaultValue: sequelize.literal('CURRENT_TIMESTAMP') }, description: { type: DataTypes.STRING(191), diff --git a/models/global_point.js b/models/global_point.js index 38b1920..54be2ff 100644 --- a/models/global_point.js +++ b/models/global_point.js @@ -119,6 +119,10 @@ module.exports = function(sequelize, DataTypes) { impact_score: { type: DataTypes.BIGINT, allowNull: true + }, + surrender: { + type: "DOUBLE", + allowNull: true } }, { tableName: 'global_point', diff --git a/models/match.js b/models/match.js index dfc0b71..5ded026 100644 --- a/models/match.js +++ b/models/match.js @@ -20,7 +20,7 @@ module.exports = function(sequelize, DataTypes) { created_at: { type: DataTypes.TIME, allowNull: false, - defaultValue: sequelize.fn('current_timestamp') + defaultValue: sequelize.literal('CURRENT_TIMESTAMP') }, duration: { type: DataTypes.INTEGER(5).UNSIGNED, diff --git a/models/participant.js b/models/participant.js index 5579f31..2f208df 100644 --- a/models/participant.js +++ b/models/participant.js @@ -52,7 +52,7 @@ module.exports = function(sequelize, DataTypes) { created_at: { type: DataTypes.TIME, allowNull: false, - defaultValue: sequelize.fn('current_timestamp') + defaultValue: sequelize.literal('CURRENT_TIMESTAMP') }, actor: { type: DataTypes.STRING(16), diff --git a/models/participant_phases.js b/models/participant_phases.js index 4d45e02..369c242 100644 --- a/models/participant_phases.js +++ b/models/participant_phases.js @@ -245,31 +245,31 @@ module.exports = function(sequelize, DataTypes) { allowNull: true }, item_grants: { - type: DataTypes.STRING(191), + type: DataTypes.BLOB, allowNull: true }, item_sells: { - type: DataTypes.STRING(191), + type: DataTypes.BLOB, allowNull: true }, ability_levels: { - type: DataTypes.STRING(191), + type: DataTypes.BLOB, allowNull: true }, ability_uses: { - type: DataTypes.STRING(191), + type: DataTypes.BLOB, allowNull: true }, ability_damage: { - type: DataTypes.STRING(191), + type: DataTypes.BLOB, allowNull: true }, item_uses: { - type: DataTypes.STRING(191), + type: DataTypes.BLOB, allowNull: true }, player_damage: { - type: DataTypes.STRING(191), + type: DataTypes.BLOB, allowNull: true }, draft_position: { diff --git a/models/team.js b/models/team.js index e320afb..eab927f 100644 --- a/models/team.js +++ b/models/team.js @@ -19,7 +19,7 @@ module.exports = function(sequelize, DataTypes) { created_at: { type: DataTypes.TIME, allowNull: false, - defaultValue: sequelize.fn('current_timestamp') + defaultValue: sequelize.literal('CURRENT_TIMESTAMP') }, name: { type: DataTypes.STRING(20), diff --git a/models/team_membership.js b/models/team_membership.js index eee2061..755e7bc 100644 --- a/models/team_membership.js +++ b/models/team_membership.js @@ -23,7 +23,7 @@ module.exports = function(sequelize, DataTypes) { joined_on: { type: DataTypes.TIME, allowNull: false, - defaultValue: sequelize.fn('current_timestamp') + defaultValue: sequelize.literal('CURRENT_TIMESTAMP') }, status: { type: DataTypes.ENUM('pending','initiate','member','officer','leader','former','veteran'), diff --git a/models/tournament.js b/models/tournament.js index 56ca5cf..27de855 100644 --- a/models/tournament.js +++ b/models/tournament.js @@ -16,6 +16,14 @@ 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 @@ -35,14 +43,6 @@ 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 092f8a8..284ca42 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 853e441..b82ba74 100644 --- a/models/users.js +++ b/models/users.js @@ -14,24 +14,22 @@ module.exports = function(sequelize, DataTypes) { }, user_token: { type: DataTypes.CHAR(36), - allowNull: false, - defaultValue: '-1' + allowNull: true }, player_api_id: { type: DataTypes.CHAR(36), - allowNull: true, - defaultValue: '' + allowNull: true }, email: { - type: DataTypes.STRING(100), - allowNull: true + type: DataTypes.STRING(191), + allowNull: false }, password: { - type: DataTypes.STRING(100), - allowNull: true + type: DataTypes.STRING(191), + allowNull: false }, remember_token: { - type: DataTypes.STRING(255), + type: DataTypes.STRING(191), allowNull: true }, access_type: { |
