From 06d6a023df177effb6ef7ee4165f4cc5c8876916 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 7 Apr 2017 18:04:39 +0200 Subject: hotfix after autogeneration --- model.js | 17 +++-------------- models/asset.js | 3 +-- models/match.js | 3 +-- models/participant.js | 3 +-- models/player_point.js | 3 +-- 5 files changed, 7 insertions(+), 22 deletions(-) diff --git a/model.js b/model.js index 7f46559..541299c 100644 --- a/model.js +++ b/model.js @@ -16,28 +16,17 @@ module.exports = (seq, Seq) => { ItemParticipant = seq.import("./models/item_participant.js"), // data stats - ParticipantExt = seq.import("./models/participant_ext.js"), - PlayerExt = seq.import("./models/player_ext.js"), - - // stats mappings - StatsDimensions = seq.import("./models/stats_dimensions.js"), - Heros = seq.import("./models/heros.js"), - - // hero stats - HeroStats = seq.import("./models/hero_stats.js"), - HeroDimension = seq.import("./models/hero_dimension.js"); + ParticipantStats = seq.import("./models/participant_stats.js"); Roster.belongsTo(Match, { foreignKey: "match_api_id", targetKey: "api_id" }); Participant.belongsTo(Roster, { foreignKey: "roster_api_id", targetKey: "api_id" }); - Participant.belongsTo(Heros, { foreignKey: "actor", targetKey: "api_name" }); + //Participant.belongsTo(Heros, { foreignKey: "actor", targetKey: "api_name" }); return { Match, Roster, Participant, Player, Asset, Item, ItemParticipant, - ParticipantExt, PlayerExt, - StatsDimensions, Heros, - HeroStats, HeroDimension + ParticipantStats }; }; diff --git a/models/asset.js b/models/asset.js index 291dfb7..ae939a0 100644 --- a/models/asset.js +++ b/models/asset.js @@ -35,8 +35,7 @@ module.exports = function(sequelize, DataTypes) { }, created_at: { type: DataTypes.TIME, - allowNull: false, - defaultValue: sequelize.fn('NOW') + allowNull: false }, description: { type: DataTypes.STRING(191), diff --git a/models/match.js b/models/match.js index d17d769..0b9f6d9 100644 --- a/models/match.js +++ b/models/match.js @@ -19,8 +19,7 @@ module.exports = function(sequelize, DataTypes) { }, created_at: { type: DataTypes.TIME, - allowNull: false, - defaultValue: sequelize.fn('NOW') + allowNull: false }, duration: { type: DataTypes.INTEGER(5).UNSIGNED, diff --git a/models/participant.js b/models/participant.js index 050d1af..c477046 100644 --- a/models/participant.js +++ b/models/participant.js @@ -31,8 +31,7 @@ module.exports = function(sequelize, DataTypes) { }, created_at: { type: DataTypes.TIME, - allowNull: false, - defaultValue: sequelize.fn('NOW') + allowNull: false }, actor: { type: DataTypes.STRING(16), diff --git a/models/player_point.js b/models/player_point.js index 4304c07..3153193 100644 --- a/models/player_point.js +++ b/models/player_point.js @@ -58,8 +58,7 @@ module.exports = function(sequelize, DataTypes) { }, created_at: { type: DataTypes.TIME, - allowNull: false, - defaultValue: sequelize.fn('NOW') + allowNull: false }, kills: { type: DataTypes.INTEGER(5).UNSIGNED, -- cgit v1.3.1