Public Access
version_auto_bump.php: emit matching schema marker when bumping schema-tracked Joomla components #351
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The auto-bump pipeline (
version_auto_bump.php, invoked by the templateauto-bump.ymlon every push todev/rc/feature/**/patch/**) advances a component's manifest<version>but does not create a corresponding Joomla schema update marker. This produces recurringcom_installerschema drift on every consuming repo.Why it drifts
Joomla's
com_installerreports a component's database as out of date when#__schemas.version_id!= the manifest<version>(exact equality). Joomla sets#__schemastoChangeSet::getSchema()= the highest.sqlfilename in the component'ssql/updates/<driver>/folder. When auto-bump walks the manifest forward (e.g.01.00.02->01.03.02-dev) without adding a matching<newversion>.sql, the highest marker stays behind and drift is permanent until someone hand-adds markers -- which the next auto-bump immediately outpaces. It is an unwinnable manual treadmill.Observed
MokoSuiteStoreLocator: live server
#__schemasfrozen at01.00.02while the manifest had auto-bumped to01.02.40+. Fixed manually (PR #85 in that repo) but the bot re-bumped past the markers twice during the same session (01.03.01-dev, then01.03.02-dev), proving the loop.Proposed fix
In
version_auto_bump.php, after computing the new version and before committing, for each Joomla extension being bumped whose manifest declares<update><schemas><schemapath type="...">...</schemapath></schemas>:<administration><files folder="...">) to the real updates dir, e.g.admin/sql/updates/mysql/.<newversion>.sqlexists there, write a no-op marker (comment +SELECT 1;, zero DDL) named exactly<newversion>.sql.Constraints / acceptance criteria
marker <= manifestrule fails on overshoot, and an overshoot flips the drift instead of clearing it).SELECT 1;) so it can never introduceChangeSeterrors.<schemapath>(skip modules/plugins/packages without one).new ChangeSet($db, $folder)->check()reports 0 errors andgetSchema()== manifest version.Context
.mokogit/workflows/auto-bump.yml(VERSION: 09.02.00), step "Bump version" ->php ${MOKO_CLI}/version_auto_bump.php.MokoConsulting/MokoSuiteStoreLocatorPR #85.Authored-by: Moko Consulting
Resolved: auto-bump now writes a matching Joomla schema update marker (main #317 create SQL update file on version bump; also cli/version_auto_bump.php writeSchemaMarkers). Closing.