Repository navigation
Conversation
Adds testChangeStringToTextEmptyTableFailsOnOracle to MigratorTest: an in-place string to text migration on an empty Oracle table raises ORA-22858. Skipped on other platforms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com> Assisted-by: ClaudeCode:claude-opus-5-5
On Oracle, preSchemaChange adds a CLOB copy of jobs.argument, copies and verifies the data, sets the copy NOT NULL if the original was, drops the original and renames the copy. changeSchema then sees TEXT and returns null. Each step is picked from the columns found, so an interrupted run resumes. Other platforms are unchanged. The new test runs the migration through MigrationService for each state oc_jobs can be in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com> Assisted-by: ClaudeCode:claude-opus-5-5
moodyjmz
force-pushed
the
fix/oracle-jobs-argument-clob
branch
from
September 30, 2026 13:18
2b0d816 to
8e4c487
Compare
Draft
4 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
occ upgradefails on Oracle: core migrationVersion34000Date20260318095645cannot convertoc_jobs.argumentto TEXT (ORA-22858) #64668Summary
occ upgradeaborts on Oracle atVersion34000Date20260318095645:VARCHAR2(4000)→CLOBcannot be done in place (ORA-22858), even on an empty table. Affects v32.0.7+, v33.0.1+ and all of 34.x on Oracle. On Oracle the migration now convertsoc_jobs.argumentout of place inpreSchemaChange, thenchangeSchemasees TEXT and no-ops. Other platforms are unchanged.Details
Cause
changeSchemacallssetType(TEXT)onjobs.argument. Doctrine emits that asALTER TABLE ... MODIFY, which Oracle rejects for VARCHAR2 → CLOB. Doctrine'sOraclePlatformalso restates the type in everyMODIFY, and on Oracle 23 anyMODIFYnaming a type on a LOB column fails (ORA-22296 withDEFAULT '' NOT NULL, ORA-22859 for a bare type), so the schema API can't restoreNOT NULLafterwards.MODIFY ("argument" NOT NULL)without the type is legal, which is what the fix uses.Fix
Oracle only, in
preSchemaChange:ADD ("argument_copy" CLOB)UPDATE ... SET "argument_copy" = "argument", then count mismatches (DBMS_LOB.COMPAREplus NULL checks); any mismatch throws with the original column untouchedMODIFY ("argument_copy" NOT NULL)if the original was NOT NULLDROP COLUMN "argument"RENAME COLUMN "argument_copy" TO "argument"Each step is chosen from the columns found in
all_tab_columns, so an interrupted run resumes where it stopped. Anargument_copythat isn't a CLOB copy of a VARCHAR2argumentthrows rather than guessing. Installs already converted by hand (CLOB, nullable or not) are left alone.The fix modifies the released class rather than adding a new one, because a new migration dated after it would never get to run on instances stuck on it. Fresh installs go through
migrateSchemaOnly(), which skipspreSchemaChangeand creates the column as CLOB directly.Between the copy and the drop, a job written only to the old column should fail on the NOT NULL copy rather than lose its argument. Upgrades run in maintenance mode, so no writers are expected.
Tests
MigratorTest::testChangeStringToTextEmptyTableFailsOnOracleVersion34000Date20260318095645Test::testInstalledSchemaHasTextColumnVersion34000Date20260318095645Test::testMigrationKeepsConvertedColumnVersion34000Date20260318095645Test::testMigrationConvertsOracleColumnThe Oracle-only tests skip on other platforms and run in the
DBgroup, sophpunit-ocicovers Oracle 18 and 23.Known limitation
On a compressed
oc_jobs,DROP COLUMNfails on Oracle 19 per Oracle's documentation, and on 23 it silently turns intoSET UNUSED. Neither is checked by the migration.Backports
Master's guard differs from stable32/33/34 since #63013 (
getType()->getName()vsType::getType()), so backportbot won't apply this cleanly; the stable branches need their own PRs.TODO
phpunit-ocigreen on Oracle 18 and 23Checklist
3. to review, feature component)stable32)AI (if applicable)
🤖 Generated with Claude Code