diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-18 17:12:53 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-18 17:12:53 +0200 |
| commit | 6dc437df7241235d31d833dde264d7bdffbd2283 (patch) | |
| tree | b24d89508fe53c6f599f8e00bd1e5f788c036cee | |
| parent | ff6237febca2ebae08e85751d936ef7323b77380 (diff) | |
| download | shrinker-6dc437df7241235d31d833dde264d7bdffbd2283.tar.gz shrinker-6dc437df7241235d31d833dde264d7bdffbd2283.zip | |
fix player upsert
| -rw-r--r-- | worker.js | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -388,7 +388,11 @@ function flatten(obj) { ), Promise.map(chunks(player_records_direct), async (p_r_d) => model.Player.bulkCreate(player_records_direct, { - updateOnDuplicate: [], // all + // if set to [] (all), upsert messes with autoincrement + updateOnDuplicate: [ + "shard_id", "api_id", "name", "last_update", + "created_at", "level", "xp", "lifetime_gold" + ], transaction: transaction }) ), |
