[IMP] tests: only persistent table must have a primary key
In some cases, it can be handy to define an unlogged/temporary table to memontarily store information from before the upgrade. We don't care for such non persistent tables to have a primary key.
Failure example: https://upgradeci.odoo.com/upgradeci/run/170069
Actually, there is a real bug in the odoo/upgrade#6690 PR: the temporary table hasn't been cleaned up by the upgrade script (due to the early return check).
Actually, there is a real bug in the odoo/upgrade#6690 PR: the temporary table hasn't been cleaned up by the upgrade script (due to the early return check).
Indeed, the CI only raised due to that mistake. On the other hand, the logs still display that error:
[...]
2024-10-29 15:24:42,513 23 INFO pied_2050437_cp_saas~17.4 odoo.upgrade.base.tests.test_module_state: Starting TestModuleState.test_prepare ...
2024-10-29 15:24:42,516 23 INFO pied_2050437_cp_saas~17.4 odoo.upgrade.testing: Calling TestModuleState.prepare
2024-10-29 15:24:42,517 23 INFO pied_2050437_cp_saas~17.4 odoo.upgrade.base.tests.test_ensure_has_pk: Starting TestTablesHavePK.test_prepare ...
2024-10-29 15:24:42,518 23 INFO pied_2050437_cp_saas~17.4 odoo.upgrade.testing: Calling TestTablesHavePK.prepare
2024-10-29 15:24:42,522 23 CRITICAL pied_2050437_cp_saas~17.4 odoo.upgrade.base.tests.test_ensure_has_pk: Some tables doesn't have any primary key:
- ___upgrade_arl_orig_sequencing
2024-10-29 15:24:42,523 23 INFO pied_2050437_cp_saas~17.4 odoo.upgrade.base.tests.test_moved0: Starting TestMoved0.test_prepare ...
2024-10-29 15:24:42,524 23 INFO pied_2050437_cp_saas~17.4 odoo.upgrade.testing: Calling TestMoved0.prepare
2024-10-29 15:24:42,524 23 INFO pied_2050437_cp_saas~17.4 odoo.upgrade.base.tests.test_moved0: skipped TestMoved0.test_prepare : Starting Odoo 16, no more `moved0` columns are created
[...]
Anyways, it's not blocking and I wouldn't have opened this PR for that alone, feel free to close or merge it, as you see fit.
