Summary
On 17.6.0, two commands documented as read-only previews write to the application's tables:
os migrate meta --stored without --apply;
os migrate audit-metadata-bodies without --apply (new in 17.6.0).
Both boot the app's seed loader against the target database. It rewrites seeded rows, and it logs an error when it tries to write to a view. The 17.5.0 CLI, run on the same file, changes nothing. So for --stored this is a 17.6.0 regression.
The 17.6.0 upgrade checklist tells every operator to run both commands first as previews:
os migrate meta --stored, then --stored --apply;
os migrate audit-metadata-bodies ("a dry run by default"), then --apply.
The preview should leave the database unchanged.
Found by the HotCRM 17.6.0 upgrade lane of the 17.6.0 release verification (objectstack-ai/hotcrm#1982, "Platform issues → A"). That session could not attach this repository, so it is filed from the release session.
Steps
- Create a SQLite database with HotCRM on 17.5.0: boot it, let the seed load run, and sign up the first admin. Copy the file.
- With
@objectstack/cli@17.6.0, run os migrate meta --stored --database-url file:<copy>. Do not pass --apply.
- Compare row hashes of the app tables before and after. Do the same for
os migrate audit-metadata-bodies --database-url file:<copy> without --apply.
Expected
A read-only preview: the file is unchanged.
Actual
The command boots the app's seed loader. On crm_contact, crm_lead, crm_opportunity and five more tables it:
- bumps
updated_at;
- stamps
organization_id on seeded rows that had none;
- rewrites relative-date seed values.
It also logs ERROR [SeedLoader] Failed to write sys_activity …: cannot modify sys_activity because it is a view, because sys_activity is a rotation view on that database.
Comparison
- The 17.5.0 CLI, running
os migrate meta --stored on the same file, leaves every row hash identical and logs no SeedLoader error.
audit-metadata-bodies is new in 17.6.0, so it has no 17.5.0 baseline. Its dry run makes the same writes.
Related
Summary
On 17.6.0, two commands documented as read-only previews write to the application's tables:
os migrate meta --storedwithout--apply;os migrate audit-metadata-bodieswithout--apply(new in 17.6.0).Both boot the app's seed loader against the target database. It rewrites seeded rows, and it logs an error when it tries to write to a view. The 17.5.0 CLI, run on the same file, changes nothing. So for
--storedthis is a 17.6.0 regression.The 17.6.0 upgrade checklist tells every operator to run both commands first as previews:
os migrate meta --stored, then--stored --apply;os migrate audit-metadata-bodies("a dry run by default"), then--apply.The preview should leave the database unchanged.
Found by the HotCRM 17.6.0 upgrade lane of the 17.6.0 release verification (objectstack-ai/hotcrm#1982, "Platform issues → A"). That session could not attach this repository, so it is filed from the release session.
Steps
@objectstack/cli@17.6.0, runos migrate meta --stored --database-url file:<copy>. Do not pass--apply.os migrate audit-metadata-bodies --database-url file:<copy>without--apply.Expected
A read-only preview: the file is unchanged.
Actual
The command boots the app's seed loader. On
crm_contact,crm_lead,crm_opportunityand five more tables it:updated_at;organization_idon seeded rows that had none;It also logs
ERROR [SeedLoader] Failed to write sys_activity …: cannot modify sys_activity because it is a view, becausesys_activityis a rotation view on that database.Comparison
os migrate meta --storedon the same file, leaves every row hash identical and logs no SeedLoader error.audit-metadata-bodiesis new in 17.6.0, so it has no 17.5.0 baseline. Its dry run makes the same writes.Related
f20f669(17.6.0) stoppedos migrate planandos migrate applyfrom runningonEnableand the host'skernel:bootstrapped/kernel:listeninghooks during their boot. The seed load reached throughmigrate meta --storedandaudit-metadata-bodiesmay need the same withholding.