diff options
| -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 | ||||
| -rw-r--r-- | package-lock.json | 112 |
11 files changed, 101 insertions, 79 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: { diff --git a/package-lock.json b/package-lock.json index 6fef734..9e64827 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,11 +22,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, - "bignumber.js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-3.1.2.tgz", - "integrity": "sha1-8725mtUmihX8HwvtL7AY4mk/4jY=" - }, "bluebird": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", @@ -71,6 +66,11 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, "cross-env": { "version": "https://registry.npmjs.org/cross-env/-/cross-env-3.2.4.tgz", "integrity": "sha1-ngWF8neGTtQhznVvgamA/w1piro=", @@ -260,11 +260,6 @@ "version": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.0.tgz", "integrity": "sha1-xh1hAgw+vpkmG3gb09FiI5X1R/g=" }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, "isexe": { "version": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" @@ -364,19 +359,52 @@ "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=" }, "mysql": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.13.0.tgz", - "integrity": "sha1-mY8fjKRuLj3XFJzpgkE2U5hqrkc=", + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.14.1.tgz", + "integrity": "sha512-ZPXqQeYH7L1QPDyC77Rcp32cNCQnNjz8Y4BbF17tOjm5yhSfjFa3xS4PvuxWJtEEmwVc4ccI7sSntj4eyYRq0A==", "requires": { - "bignumber.js": "3.1.2", - "readable-stream": "1.1.14", + "bignumber.js": "4.0.2", + "readable-stream": "2.3.3", + "safe-buffer": "5.1.1", "sqlstring": "2.2.0" }, "dependencies": { - "sqlstring": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.2.0.tgz", - "integrity": "sha1-wxNcTqirzX5+50GklmqJHYak8ZE=" + "bignumber.js": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.0.2.tgz", + "integrity": "sha1-LR3DfuWWiGfs6pC22k0W5oYI0h0=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } } } }, @@ -466,6 +494,11 @@ "pinkie": "2.0.4" } }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, "proxyquire": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-1.8.0.tgz", @@ -499,29 +532,6 @@ "read-pkg": "1.1.0" } }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, "request": { "version": "2.81.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", @@ -980,6 +990,11 @@ "glob": "7.1.2" } }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, "semver": { "version": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" @@ -1067,10 +1082,10 @@ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "sqlstring": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.2.0.tgz", + "integrity": "sha1-wxNcTqirzX5+50GklmqJHYak8ZE=" }, "string-width": { "version": "1.0.2", @@ -1113,6 +1128,11 @@ "version": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz", "integrity": "sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg=" }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, "uuid": { "version": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=" |
