Skip to content

fix(SchemaBuilder): allow timestamps in alter statements - #314

Merged
elpete merged 1 commit into
nextfrom
agent/fix-310-alter-timestamps
Aug 12, 2026
Merged

fix(SchemaBuilder): allow timestamps in alter statements#314
elpete merged 1 commit into
nextfrom
agent/fix-310-alter-timestamps

Conversation

@elpete

@elpete elpete commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • queue both createdDate and modifiedDate columns when timestamps() is used in an alter callback
  • preserve the existing create-table behavior
  • cover generated alter SQL for all six supported schema grammars

Root cause

timestamps() appended two columns and returned the blueprint. Unlike single-column helpers, it could not be passed to addColumn(), and an alter blueprint did not automatically queue either appended column. As a result, there was no supported way to add both timestamp columns with the shortcut.

Validation

  • reproduced first with a failing regression test: expected 2 alter statements, received 0
  • schema suite: 836 passed
  • full suite on Lucee 6.2.7.16: 2,586 passed, 0 failed, 0 errors, 3 skipped
  • box run-script format:check
  • git diff --check

Fixes #310

@elpete
elpete marked this pull request as ready for review August 11, 2026 23:44
@elpete
elpete changed the base branch from main to next August 11, 2026 23:55
@elpete
elpete force-pushed the agent/fix-310-alter-timestamps branch from 4943643 to 69f07c6 Compare August 12, 2026 02:23
@elpete
elpete merged commit a539461 into next Aug 12, 2026
18 checks passed
@elpete
elpete deleted the agent/fix-310-alter-timestamps branch August 12, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Its impossible to alter a table to add table.timestamps()

1 participant