diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-06-08 12:42:19 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-06-08 12:42:19 +0200 |
| commit | c5cd9e53d7413ce960a2170eedb466073175bf80 (patch) | |
| tree | c68eaf276b864e710645a8b1d8ca5e4c3de90271 | |
| parent | e263eecd3951de72a67d00c26c95e9752179a39c (diff) | |
| download | orm-c5cd9e53d7413ce960a2170eedb466073175bf80.tar.gz orm-c5cd9e53d7413ce960a2170eedb466073175bf80.zip | |
import 2.7.0 table changes
| -rw-r--r-- | models/ability.js | 53 | ||||
| -rw-r--r-- | models/asset.js | 2 | ||||
| -rw-r--r-- | models/build.js | 4 | ||||
| -rw-r--r-- | models/division.js | 29 | ||||
| -rw-r--r-- | models/division_team.js | 41 | ||||
| -rw-r--r-- | models/event.js | 57 | ||||
| -rw-r--r-- | models/game_mode.js | 2 | ||||
| -rw-r--r-- | models/global_point_build.js | 109 | ||||
| -rw-r--r-- | models/global_point_hero.js | 113 | ||||
| -rw-r--r-- | models/match.js | 4 | ||||
| -rw-r--r-- | models/participant.js | 2 | ||||
| -rw-r--r-- | models/participant_phases.js | 32 | ||||
| -rw-r--r-- | models/player.js | 13 | ||||
| -rw-r--r-- | models/result.js | 41 | ||||
| -rw-r--r-- | models/roster.js | 6 | ||||
| -rw-r--r-- | models/season.js | 41 | ||||
| -rw-r--r-- | models/stage.js | 45 | ||||
| -rw-r--r-- | models/team.js | 2 | ||||
| -rw-r--r-- | models/tmp_dupe.js | 16 |
19 files changed, 601 insertions, 11 deletions
diff --git a/models/ability.js b/models/ability.js new file mode 100644 index 0000000..1c71e6e --- /dev/null +++ b/models/ability.js @@ -0,0 +1,53 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('ability', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + created_at: { + type: DataTypes.TIME, + allowNull: true + }, + updated_at: { + type: DataTypes.TIME, + allowNull: true + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: true + }, + hero_id: { + type: DataTypes.STRING(191), + allowNull: true + }, + ability: { + type: DataTypes.STRING(191), + allowNull: false + }, + name: { + type: DataTypes.STRING(191), + allowNull: false + }, + type: { + type: DataTypes.STRING(191), + allowNull: false + }, + active: { + type: DataTypes.STRING(191), + allowNull: false + }, + passive: { + type: DataTypes.STRING(191), + allowNull: false + } + }, { + tableName: 'ability', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/asset.js b/models/asset.js index 1f51ef6..ae939a0 100644 --- a/models/asset.js +++ b/models/asset.js @@ -14,7 +14,7 @@ module.exports = function(sequelize, DataTypes) { unique: true }, shard_id: { - type: DataTypes.STRING(191), + type: DataTypes.STRING(5), allowNull: false }, match_api_id: { diff --git a/models/build.js b/models/build.js index b789606..c3ab621 100644 --- a/models/build.js +++ b/models/build.js @@ -35,6 +35,10 @@ module.exports = function(sequelize, DataTypes) { item_6: { type: DataTypes.STRING(191), allowNull: true + }, + dimension_on: { + type: DataTypes.STRING(191), + allowNull: true } }, { tableName: 'build', diff --git a/models/division.js b/models/division.js new file mode 100644 index 0000000..d42e09e --- /dev/null +++ b/models/division.js @@ -0,0 +1,29 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('division', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: true + }, + stage_id: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + name: { + type: DataTypes.STRING(191), + allowNull: false + } + }, { + tableName: 'division', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/division_team.js b/models/division_team.js new file mode 100644 index 0000000..4db03f7 --- /dev/null +++ b/models/division_team.js @@ -0,0 +1,41 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('division_team', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + team_id: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + division_id: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + played: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + wins: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + points: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + seed: { + type: DataTypes.INTEGER(11), + allowNull: false + } + }, { + tableName: 'division_team', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/event.js b/models/event.js new file mode 100644 index 0000000..beed589 --- /dev/null +++ b/models/event.js @@ -0,0 +1,57 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('event', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: true + }, + group_id: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + name: { + type: DataTypes.STRING(191), + allowNull: false + }, + team_1_id: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + team_1_score: { + type: DataTypes.INTEGER(11), + allowNull: true + }, + team_2_id: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + team_2_score: { + type: DataTypes.INTEGER(11), + allowNull: true + }, + date: { + type: DataTypes.TIME, + allowNull: true + }, + bestOf: { + type: DataTypes.ENUM('1','3','5','7','9'), + allowNull: true + }, + winner_id: { + type: DataTypes.INTEGER(11), + allowNull: true + } + }, { + tableName: 'event', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/game_mode.js b/models/game_mode.js index 06ec06d..5eb1a91 100644 --- a/models/game_mode.js +++ b/models/game_mode.js @@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) { autoIncrement: true }, name: { - type: DataTypes.STRING(25), + type: DataTypes.STRING(16), allowNull: false, unique: true } diff --git a/models/global_point_build.js b/models/global_point_build.js new file mode 100644 index 0000000..799a4c5 --- /dev/null +++ b/models/global_point_build.js @@ -0,0 +1,109 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('global_point_build', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + updated_at: { + type: DataTypes.DATE, + allowNull: false + }, + series_id: { + type: DataTypes.BIGINT, + allowNull: false + }, + filter_id: { + type: DataTypes.BIGINT, + allowNull: false + }, + hero_id: { + type: DataTypes.BIGINT, + allowNull: false + }, + game_mode_id: { + type: DataTypes.BIGINT, + allowNull: false + }, + skill_tier_id: { + type: DataTypes.BIGINT, + allowNull: false + }, + build_id: { + type: DataTypes.BIGINT, + allowNull: true + }, + role_id: { + type: DataTypes.BIGINT, + allowNull: true + }, + region_id: { + type: DataTypes.BIGINT, + allowNull: true + }, + played: { + type: DataTypes.BIGINT, + allowNull: true + }, + wins: { + type: DataTypes.BIGINT, + allowNull: true + }, + time_spent: { + type: DataTypes.BIGINT, + allowNull: true + }, + kills: { + type: DataTypes.BIGINT, + allowNull: true + }, + deaths: { + type: DataTypes.BIGINT, + allowNull: true + }, + assists: { + type: DataTypes.BIGINT, + allowNull: true + }, + minion_kills: { + type: DataTypes.BIGINT, + allowNull: true + }, + jungle_kills: { + type: DataTypes.BIGINT, + allowNull: true + }, + non_jungle_minion_kills: { + type: DataTypes.BIGINT, + allowNull: true + }, + crystal_mine_captures: { + type: DataTypes.BIGINT, + allowNull: true + }, + gold_mine_captures: { + type: DataTypes.BIGINT, + allowNull: true + }, + kraken_captures: { + type: DataTypes.BIGINT, + allowNull: true + }, + turret_captures: { + type: DataTypes.BIGINT, + allowNull: true + }, + gold: { + type: DataTypes.BIGINT, + allowNull: true + } + }, { + tableName: 'global_point_build', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/global_point_hero.js b/models/global_point_hero.js new file mode 100644 index 0000000..4f6aa22 --- /dev/null +++ b/models/global_point_hero.js @@ -0,0 +1,113 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('global_point_hero', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + updated_at: { + type: DataTypes.DATE, + allowNull: false + }, + series_id: { + type: DataTypes.BIGINT, + allowNull: false + }, + filter_id: { + type: DataTypes.BIGINT, + allowNull: false + }, + game_mode_id: { + type: DataTypes.BIGINT, + allowNull: false + }, + skill_tier_id: { + type: DataTypes.BIGINT, + allowNull: false + }, + build_id: { + type: DataTypes.BIGINT, + allowNull: true + }, + role_id: { + type: DataTypes.BIGINT, + allowNull: true + }, + region_id: { + type: DataTypes.BIGINT, + allowNull: true + }, + hero_id: { + type: DataTypes.BIGINT, + allowNull: false + }, + enemy_hero_id: { + type: DataTypes.BIGINT, + allowNull: false + }, + played: { + type: DataTypes.BIGINT, + allowNull: true + }, + wins: { + type: DataTypes.BIGINT, + allowNull: true + }, + time_spent: { + type: DataTypes.BIGINT, + allowNull: true + }, + kills: { + type: DataTypes.BIGINT, + allowNull: true + }, + deaths: { + type: DataTypes.BIGINT, + allowNull: true + }, + assists: { + type: DataTypes.BIGINT, + allowNull: true + }, + minion_kills: { + type: DataTypes.BIGINT, + allowNull: true + }, + jungle_kills: { + type: DataTypes.BIGINT, + allowNull: true + }, + non_jungle_minion_kills: { + type: DataTypes.BIGINT, + allowNull: true + }, + crystal_mine_captures: { + type: DataTypes.BIGINT, + allowNull: true + }, + gold_mine_captures: { + type: DataTypes.BIGINT, + allowNull: true + }, + kraken_captures: { + type: DataTypes.BIGINT, + allowNull: true + }, + turret_captures: { + type: DataTypes.BIGINT, + allowNull: true + }, + gold: { + type: DataTypes.BIGINT, + allowNull: true + } + }, { + tableName: 'global_point_hero', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/match.js b/models/match.js index 4faf015..f36aa7b 100644 --- a/models/match.js +++ b/models/match.js @@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) { autoIncrement: true }, shard_id: { - type: DataTypes.STRING(191), + type: DataTypes.STRING(5), allowNull: false }, api_id: { @@ -19,7 +19,7 @@ module.exports = function(sequelize, DataTypes) { }, created_at: { type: DataTypes.TIME, - allowNull: false + allowNull: true }, duration: { type: DataTypes.INTEGER(5).UNSIGNED, diff --git a/models/participant.js b/models/participant.js index 0751c01..8faeaaf 100644 --- a/models/participant.js +++ b/models/participant.js @@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) { autoIncrement: true }, shard_id: { - type: DataTypes.STRING(191), + type: DataTypes.STRING(5), allowNull: false }, api_id: { diff --git a/models/participant_phases.js b/models/participant_phases.js index dbaf1bd..c380de3 100644 --- a/models/participant_phases.js +++ b/models/participant_phases.js @@ -239,6 +239,38 @@ module.exports = function(sequelize, DataTypes) { offmeta_score: { type: "DOUBLE", allowNull: true + }, + items: { + type: DataTypes.STRING(191), + allowNull: true + }, + item_grants: { + type: DataTypes.STRING(191), + allowNull: true + }, + item_sells: { + type: DataTypes.STRING(191), + allowNull: true + }, + ability_levels: { + type: DataTypes.STRING(191), + allowNull: true + }, + ability_uses: { + type: DataTypes.STRING(191), + allowNull: true + }, + ability_damage: { + type: DataTypes.STRING(191), + allowNull: true + }, + item_uses: { + type: DataTypes.STRING(191), + allowNull: true + }, + player_damage: { + type: DataTypes.STRING(191), + allowNull: true } }, { tableName: 'participant_phases', diff --git a/models/player.js b/models/player.js index 3f0565b..ba20381 100644 --- a/models/player.js +++ b/models/player.js @@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) { autoIncrement: true }, shard_id: { - type: DataTypes.STRING(191), + type: DataTypes.STRING(5), allowNull: false }, api_id: { @@ -19,7 +19,8 @@ module.exports = function(sequelize, DataTypes) { }, name: { type: DataTypes.STRING(191), - allowNull: false + allowNull: false, + defaultValue: "" }, last_match_created_date: { type: DataTypes.TIME, @@ -48,7 +49,7 @@ module.exports = function(sequelize, DataTypes) { skill_tier: { type: DataTypes.INTEGER(6), allowNull: true - }/*, + }, trueskill_mu: { type: "DOUBLE", allowNull: true @@ -56,7 +57,11 @@ module.exports = function(sequelize, DataTypes) { trueskill_sigma: { type: "DOUBLE", allowNull: true - }*/ + }, + elo: { + type: "DOUBLE", + allowNull: true + } }, { tableName: 'player', timestamps: false, diff --git a/models/result.js b/models/result.js new file mode 100644 index 0000000..f7c5f8c --- /dev/null +++ b/models/result.js @@ -0,0 +1,41 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('result', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: true + }, + event_id: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + match_api_id: { + type: DataTypes.CHAR(36), + allowNull: false + }, + shard_id: { + type: DataTypes.CHAR(36), + allowNull: false + }, + sequence: { + type: DataTypes.INTEGER(3).UNSIGNED, + allowNull: true + }, + winner_id: { + type: DataTypes.INTEGER(11), + allowNull: true + } + }, { + tableName: 'result', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/roster.js b/models/roster.js index d4b34e0..ef5747b 100644 --- a/models/roster.js +++ b/models/roster.js @@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) { autoIncrement: true }, shard_id: { - type: DataTypes.STRING(191), + type: DataTypes.STRING(5), allowNull: false }, api_id: { @@ -52,6 +52,10 @@ module.exports = function(sequelize, DataTypes) { winner: { type: DataTypes.INTEGER(1), allowNull: false + }, + bans: { + type: DataTypes.STRING(191), + allowNull: true } }, { tableName: 'roster', diff --git a/models/season.js b/models/season.js new file mode 100644 index 0000000..db5959f --- /dev/null +++ b/models/season.js @@ -0,0 +1,41 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('season', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: true + }, + league_id: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + name: { + type: DataTypes.STRING(191), + allowNull: false + }, + start: { + type: DataTypes.TIME, + allowNull: true + }, + end: { + type: DataTypes.TIME, + allowNull: true + }, + status: { + type: DataTypes.ENUM('planned','pre-season','in-season','post-season'), + allowNull: false + } + }, { + tableName: 'season', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/stage.js b/models/stage.js new file mode 100644 index 0000000..222c130 --- /dev/null +++ b/models/stage.js @@ -0,0 +1,45 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('stage', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: true + }, + season_id: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + name: { + type: DataTypes.STRING(191), + allowNull: false + }, + start: { + type: DataTypes.TIME, + allowNull: true + }, + end: { + type: DataTypes.TIME, + allowNull: true + }, + type: { + type: DataTypes.ENUM('group','league','swiss','single_elimination','double_elimination','bracket'), + allowNull: false + }, + status: { + type: DataTypes.ENUM('planned','active','finished'), + allowNull: false + } + }, { + tableName: 'stage', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/team.js b/models/team.js index c0830b8..c9a7880 100644 --- a/models/team.js +++ b/models/team.js @@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) { autoIncrement: true }, shard_id: { - type: DataTypes.STRING(191), + type: DataTypes.STRING(5), allowNull: true }, api_id: { diff --git a/models/tmp_dupe.js b/models/tmp_dupe.js new file mode 100644 index 0000000..4ef2615 --- /dev/null +++ b/models/tmp_dupe.js @@ -0,0 +1,16 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('tmp_dupe', { + id: { + type: DataTypes.INTEGER(11).UNSIGNED, + allowNull: false, + primaryKey: true + } + }, { + tableName: 'tmp_dupe', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; |
