Skip to content

fix #97 Align process_schedule.input (VARCHAR(255) in the mapping) and log_record.process_execution_id (migration) - #98

Merged
njoubert-cleverage merged 1 commit into
mainfrom
97
Oct 5, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
97

Conversation

@njoubert-cleverage

@njoubert-cleverage njoubert-cleverage commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #97.

process_schedule.input: the column created by the migrations (VARCHAR(255)) is kept, the mapping is fixed instead (the schedule input is a single-line value such as a file path):

  • ProcessSchedule::$input: #[ORM\Column(length: 255, nullable: true)] (was Types::TEXT)
  • docs/reference/05-scheduler.md: 255 characters max
  • no schema change. Validating the length of the fields against their columns is a broader topic, not handled here

log_record.process_execution_id: new migration Version20261005120000 (MySQL / MariaDB, PostgreSQL; nothing on the other platforms, as the existing migrations):

MySQL / MariaDB PostgreSQL
up DELETE FROM log_record WHERE process_execution_id IS NULL, MODIFY process_execution_id INT NOT NULL same DELETE, ALTER process_execution_id SET NOT NULL
down MODIFY process_execution_id INT DEFAULT NULL ALTER process_execution_id DROP NOT NULL

The log records without process execution are deleted before the NOT NULL change (they are never displayed: the UI lists the logs of an execution).

Checked:

  • bundle (Symfony 8.1, PHP 8.5): 330 tests OK. PHPStan, PHP-CS-Fixer, Rector OK
  • process-bundle-demo, MySQL 9.1: doctrine:migrations:migrate runs the 2 statements; process_schedule.input and log_record.process_execution_id no longer reported by doctrine:schema:update --dump-sql (only the cosmetic (DC2Type:...) comments remain); down / up OK
  • PostgreSQL 16 (throwaway container): the statements of up / down run, the orphan log record is deleted

Not handled here: the migrations of the bundle are broken on PostgreSQL (#99).

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

None for the schemas created by the migrations. Applications that created process_schedule.input as TEXT (e.g. with doctrine:schema:update) now get a diff to VARCHAR(255). The log records without process execution, if any, are deleted by the migration.

🤖 Generated with Claude Code

@njoubert-cleverage njoubert-cleverage added the bug Something isn't working label Oct 5, 2026
@njoubert-cleverage njoubert-cleverage changed the title fix #97 Align process_schedule.input and log_record.process_execution_id on the mapping fix #97 Align process_schedule.input (VARCHAR(255) in the mapping) and log_record.process_execution_id (migration) Oct 5, 2026
…d log_record.process_execution_id

ProcessSchedule::$input is mapped as VARCHAR(255), as created by the migrations (it was mapped as TEXT).
log_record.process_execution_id was created as nullable (NOT NULL in the mapping): new migration deleting the log
records without process execution before the NOT NULL change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit e7b1c75 into main Oct 5, 2026
18 checks passed
njoubert-cleverage added a commit that referenced this pull request Oct 5, 2026
process_execution.context was created as NOT NULL by Version20241007152613 while the mapping declares it nullable.
Handled in Version20261005120000 (added by #98, never released).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mapping and schema created by the migrations differ: process_schedule.input, log_record.process_execution_id, process_execution.context

1 participant