Commit f61521a
committed
fix(jira): _raw_data_*-Spalten in _tool_jira_sprint_reports nachruesten
Integriert den Inhalt von PR apache#9015 in den lokalen
Integrations-Branch.
Die Sprint-Report-Migration 20260722_add_sprint_report_table.go legt
_tool_jira_sprint_reports aus einem Struct an, das common.NoPKModel
nicht einbettet, waehrend das Laufzeitmodell models.JiraSprintReport es
einbettet. Die Spalten _raw_data_params / _raw_data_table /
_raw_data_id / _raw_data_remark (plus created_at, updated_at) fehlten
daher, sodass die Cleanup-Query des ApiExtractors
WHERE _raw_data_table = ? AND _raw_data_params = ?
den Subtask extractSprintReport mit "Error 1054 (42S22): Unknown column
'_raw_data_table' in 'where clause'" abbrechen liess.
Neue, additive Migration statt Aenderung der alten: Migrationsskripte
sind append-only, und ein Edit wuerde Datenbanken nicht reparieren, die
die Version bereits protokolliert haben.
Zwei Schema-Drift-Guards, die die ECHTEN Migrationsskripte ausfuehren
(statt das Laufzeitmodell zu AutoMigrate-n, was genau diese Drift
verdecken wuerde):
* plugins/jira/e2e/migration_schema_test.go - Jira-spezifisch.
* plugins/schema_e2e/migration_schema_test.go - plugin-uebergreifend
fuer alle Go-Plugins, inkl. TestAllGoPluginsListed.
Der uebergreifende Guard deckte drei bestehende Drifts derselben Klasse
auf, je mit eigener additiver Migration behoben:
* _tool_taiga_scope_configs - type_mappings fehlte
* _tool_teambition_scope_configs - id, created_at, updated_at fehlten
* _tool_testmo_scope_configs - connection_id, name fehlten
Verifiziert gegen MySQL 8.4.10 und PostgreSQL 17.2: neue Spalten werden
nullable angelegt, doppelte NULLs sind im uniqueIndex zulaessig, und die
AUTO_INCREMENT-PK laesst sich auf der PK-losen Teambition-Tabelle
nachruesten (kein Error 1075). Alle vier Migrationen wurden zusaetzlich
auf der bestehenden lokalen Datenbank angewendet.
Ausserdem: plugins/schema_e2e in scripts/build-plugins.sh ausgeschlossen
(kein Plugin, kein main-Package -> "make build-plugin" scheiterte mit
"-buildmode=plugin requires exactly one main package").
AGENTS.md um die Schema-Drift-Guards und die zugehoerigen Fallstricke
ergaenzt (fork-only, nicht Teil des Upstream-PRs).
Signed-off-by: DoDiODev <DoDiDev@proton.me>1 parent 2f49d1e commit f61521a
12 files changed
Lines changed: 649 additions & 1 deletion
File tree
- backend
- plugins
- jira
- e2e
- models/migrationscripts
- schema_e2e
- taiga/models/migrationscripts
- teambition/models/migrationscripts
- testmo/models/migrationscripts
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
165 | 191 | | |
166 | 192 | | |
167 | 193 | | |
| |||
177 | 203 | | |
178 | 204 | | |
179 | 205 | | |
| 206 | + | |
180 | 207 | | |
| 208 | + | |
181 | 209 | | |
182 | 210 | | |
183 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
0 commit comments