docs(migration): note that t.timestamps() also adds deletedAt (#2313)#2362
Merged
docs(migration): note that t.timestamps() also adds deletedAt (#2313)#2362
Conversation
Three v3-0-0 doc spots described `t.timestamps()` as creating only `createdAt` and `updatedAt`. The actual implementation in `vendor/wheels/migrator/TableDefinition.cfc:372` adds three columns — the third is `deletedAt`, the soft-delete marker. The v4-0-0-snapshot guide and the v3 database-migrations index already document the three-column behavior, and CLAUDE.md anti-pattern #7 calls this out for code generators. This PR fixes the remaining v3-0-0 references so users reading any of these pages get a consistent picture. Issue #2313 explicitly recommends the docs path here ("the project's own CLAUDE.md anti-pattern #7 already documents the three-column behavior, so the docs side may be the right move") rather than making the soft- delete column opt-in, which would be a backward-compat break for every existing app on disk.
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.
Summary
t.timestamps()as creating onlycreatedAtandupdatedAt. The implementation in vendor/wheels/migrator/TableDefinition.cfc:372 actually adds three columns; the third isdeletedAt, the soft-delete marker.t.timestamps()line in Polish bucket: minor CLI / framework / doc inconsistencies surfaced by VM-onboarding journals #2313.Why docs and not opt-in
The issue explicitly recommends the docs path:
Making the soft-delete column opt-in would silently change the migration output for every existing Wheels app on disk — a backward-compat break for cosmetic gain. Documenting the existing behavior is the right move.
Files changed
using-sqlite.md// Creates createdAt and updatedAt as TEXT// Creates createdAt, updatedAt, and deletedAt as TEXTcli-guides/migrations.md// Creates createdAt and updatedAt// Creates createdAt, updatedAt, and deletedAt (soft-delete marker)commands/generate/migration.md(table row)Creates createdAt and updatedAtCreates createdAt, updatedAt, and deletedAt (soft-delete marker)Test plan