feat(Team): add isInLeagueTable and leagueTableRank fields with migration
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 1m3s

This commit is contained in:
Torsten Schulz (local)
2026-09-22 12:03:03 +02:00
parent fc8c1a28c9
commit 2536143804
5 changed files with 117 additions and 12 deletions

View File

@@ -101,6 +101,20 @@ const Team = sequelize.define('Team', {
allowNull: false,
defaultValue: 0,
},
// A schedule may contain provisional or stale opponents. Only teams that
// occur in the latest official click-TT table belong in the league table.
isInLeagueTable: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: true,
},
// click-TT already applies all association-specific tie-breakers. Keep its
// rank instead of attempting to recreate those rules locally.
leagueTableRank: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
},
}, {
underscored: true,
tableName: 'team',