Skip to content

[20.0][OU-ADD] survey: migration scripts - #143

Draft
dnplkndll wants to merge 1 commit into
20.0from
20.0-mig-survey
Draft

dnplkndll wants to merge 1 commit into
20.0from
20.0-mig-survey

Conversation

@dnplkndll

Copy link
Copy Markdown

post-migration.py

20.0 re-cut the certificate layouts along both axes.

19.0 offered modern / classic in purple, blue or gold. 20.0 offers modern,
minimal, classic-1 and classic-2, each in the company colour or black. No
19.0 value survives, so every certified survey keeps a key the selection no
longer declares -- the layout silently falls back and the field reads blank.

left() rather than LIKE 'modern%': openupgradelib's logged_query hands the
query to psycopg2 with an args tuple, so a literal % is read as a parameter
placeholder and the call dies on IndexError before reaching the database.

The style is what carries over; the colour does not, because 20.0 has no
purple, blue or gold. The company variant is the closer of the two on
offer: those three were brand colours, not black. classic becomes
classic-1, which is the layout 20.0 kept under that name.


CI: red until #118 lands

The test job fails on duplicate key value violates unique constraint "res_country_state_name_code_uniq" (Ladakh / Odisha). Not this branch:
base's pre-migration, which renames those two external ids, lives in #118 and
is not on 20.0 yet, so every branch cut from 20.0 alone hits it. Per the
fork's model the per-PR check is the lean one; the real migration gate is the
integration branch (#120), where all of this runs green over the full
585-module seed.

AI-assisted (Claude Code); every change reviewed, tested, and owned by the author.

### post-migration.py

20.0 re-cut the certificate layouts along both axes.

19.0 offered modern / classic in purple, blue or gold. 20.0 offers modern,
minimal, classic-1 and classic-2, each in the company colour or black. No
19.0 value survives, so every certified survey keeps a key the selection no
longer declares -- the layout silently falls back and the field reads blank.

left() rather than LIKE 'modern%': openupgradelib's logged_query hands the
query to psycopg2 with an args tuple, so a literal % is read as a parameter
placeholder and the call dies on IndexError before reaching the database.

The style is what carries over; the colour does not, because 20.0 has no
purple, blue or gold. The company variant is the closer of the two on
offer: those three were brand colours, not black. classic becomes
classic-1, which is the layout 20.0 kept under that name.

Assisted-by: Claude Opus 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant