Skip to content

feat(entity): add optional unique sourceKey to ApiConfiguration - #14

Merged
schmunk42 merged 1 commit into
masterfrom
feature/source-key
Nov 11, 2026
Merged

schmunk42 merged 1 commit into
masterfrom
feature/source-key

Conversation

@schmunk42

Copy link
Copy Markdown
Member

Adds ApiConfiguration::$sourceKey (column source_key), an optional, operator-defined key of the upstream source.

  • Nullable and unique (any number of configurations without a key), pattern ^[a-z0-9][a-z0-9.-]{1,40}$, UniqueEntity validation (422 on duplicates).
  • Migration Version20261111100000, portable across MySQL, PostgreSQL and SQLite (covered by MigrationsPortabilityTest).
  • The bundle only stores and validates the key. Applications can derive deterministic ids of imported records from it, e.g. a UUID v5 of <sourceKey>:<type>:<external id>, so installations that give a source the same key assign the same ids. See README, "Source key".
  • Tests: SourceKeyTest (set, default null, invalid formats, duplicate). 123 tests green.

Non-breaking; intended release: 0.7.0 (new column → consumers run their migrations).

🤖 Generated with Claude Code

Operator-defined key of the upstream source; applications derive
deterministic ids of imported records from it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schmunk42
schmunk42 merged commit f6e2a51 into master Nov 11, 2026
2 checks passed
@schmunk42
schmunk42 deleted the feature/source-key branch November 11, 2026 16:35
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