Skip to content

proposal: a renamed field keeps its values, a retired one is dropped only on request - renamedFrom / dropped - #96

Open
delchev wants to merge 1 commit into
mainfrom
renamed-from-dropped
Open

delchev wants to merge 1 commit into
mainfrom
renamed-from-dropped

Conversation

@delchev

@delchev delchev commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Proposal 0060. An entity's table outlives the file version that created it, and once the application holds data, renaming a field and retiring one look alike from the file alone: a name disappears and, for a rename, another appears. Read naively, a rename adds an empty column beside the old one (every existing row loses the value under its new name), and a removal deletes a column of production data with no step anyone could review.

The proposed shape (expand/contract):

  • field-level renamedFrom: <old field name> - applying the file renames the stored column in place, so the values move with the new name. It acts only while the old column exists and the new one does not, so it is harmless to leave in the file after the rename ran.
  • entity-level dropped: [names] - former field / to-one relation names whose columns applying the file removes, data included. The explicit contract step.
  • normative default: a field simply deleted from the file keeps its column and its values; it is not dropped.
  • authoring errors: a dropped: name or renamedFrom: source the entity still declares (compared by the column the name maps to), a field renamedFrom its own name, a renamedFrom source also under dropped:, two fields renamedFrom the same name, an empty name in either key.
entities:
  - name: Invoice
    dropped: [legacyCode]
    fields:
      - { name: id, type: integer, primaryKey: true, generated: true }
      - { name: issueDate, type: date, renamedFrom: invoiceDate }

The proposal carries the exact specification text (a new subsection under Entities & fields, after unique - a business key over more than one field), the rows for the fields and entity-attribute tables, and the two Appendix A: DSL index rows. Per CONTRIBUTING, this PR does not touch versions/; the release folds it in.

Reference implementation: eclipse-dirigible/dirigible#7674 (issue eclipse-dirigible/dirigible#7635).

🤖 Generated with Claude Code

…only on request - renamedFrom / dropped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant