Skip to content

v17/migrations - delegate tracking out of core.#921

Merged
KevinJump merged 20 commits intov17/mainfrom
v17/migrations-full-set-cache-policy
Mar 26, 2026
Merged

v17/migrations - delegate tracking out of core.#921
KevinJump merged 20 commits intov17/mainfrom
v17/migrations-full-set-cache-policy

Conversation

@KevinJump
Copy link
Copy Markdown
Owner

@KevinJump KevinJump commented Mar 26, 2026

This PR moves the tracking of changed in DataType EditorAlias, and mapping of content values from older to to newer editor aliases, out of the core and to 'external' (e.g uSync.Migrations) code. .,

  • Remove the Persistence and Migrations Repo/Services so there is no DB elements in the core.
  • Add new IConfigurationTrackingSerializer interface so editorAlias renames can be passed on
  • Add new ISyncMapperTracker and collection so we can fetch additional value mappers from external sources when mapping the content values.

Doing this means that the core no longer has the database tables, so there is no extra overheads for people who don't have uSync.Migrations installed.

uSync.Migrations will now handle the persistence for tracking changes that happen when datatypes are updated without core knowing about them.

KevinJump and others added 17 commits March 24, 2026 14:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…icy.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…icy.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…icy.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR relocates editor-alias change tracking and legacy-to-new value mapping support out of uSync.Core (removing DB persistence/migration concerns from core) and enables external packages (e.g., uSync.Migrations) to provide tracking + mapper behavior via new extension points.

Changes:

  • Removed core DB persistence/migration infrastructure (repositories/services/migration plans) previously used for alias-change tracking.
  • Introduced tracking extension points: IConfigurationTrackingSerializer and ISyncMapperTracker (+ SyncMapperTrackerCollection) for externalized alias rename tracking and mapper discovery.
  • Added a core notification (SyncExportCleanNotification) and published it on export folder clean to allow external cleanup.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uSync.Core/uSyncCoreBuilderExtensions.cs Removes core migration registration; registers new mapper-tracker collection.
uSync.Core/uSync.Core.csproj Adds Notifications folder entry for the new notification type.
uSync.Core/Serialization/Serializers/DataTypeSerializer.cs Replaces DB-backed rename tracking with ConfigurationSerializerCollection.TrackRenamedEditorAsync.
uSync.Core/Persistance/SyncDataServiceBase.cs Deleted: core persistence service base.
uSync.Core/Persistance/SyncDataRespositoryBase.cs Deleted: core persistence repository base.
uSync.Core/Persistance/SyncDataRepositoryCachePolicy.cs Deleted: core persistence cache policy.
uSync.Core/Persistance/ISyncDataService.cs Deleted: core persistence service interface.
uSync.Core/Persistance/ISyncDataRespository.cs Deleted: core persistence repository interface.
uSync.Core/Persistance/ISyncDataRepositoryCachePolicy.cs Deleted: core persistence cache policy interface.
uSync.Core/Persistance/ISyncDataEntity.cs Deleted: core persistence entity interface.
uSync.Core/Notifications/SyncExportCleanNotification.cs Adds new notification to support external cleanup when export is cleaned.
uSync.Core/Migrations/* Deleted: core migration tracking types, repo/service, and migration plan/table creation.
uSync.Core/Mapping/Tracking/SyncMapperTrackerCollection.cs Adds collection/builder to aggregate external tracker-provided mappers.
uSync.Core/Mapping/Tracking/ISyncMapperTracker.cs Adds tracker interface for external alias-based mapper retrieval.
uSync.Core/Mapping/SyncValueMapperCollection.cs Switches importing mappers discovery from DB to tracker collection; updates mapper selection to use IsMapper.
uSync.Core/Mapping/SyncValueMapperBase.cs Adds IsMapper(string) default behavior for mapper base classes.
uSync.Core/Mapping/ISyncMapper.cs Adds IsMapper(string) to the public mapper interface.
uSync.Core/DataTypes/IConfigurationSerializer.cs Adds IConfigurationTrackingSerializer for rename tracking callbacks.
uSync.Core/DataTypes/ConfigurationSerializerCollectionBuilder.cs Adds rename-tracking dispatch method on ConfigurationSerializerCollection.
uSync.BackOffice/Services/SyncService.cs Publishes SyncExportCleanNotification when cleaning export folder; removes unused usings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread uSync.Core/Mapping/SyncValueMapperCollection.cs Outdated
Comment thread uSync.Core/Mapping/ISyncMapper.cs
@KevinJump KevinJump merged commit cc28bcc into v17/main Mar 26, 2026
4 checks passed
@KevinJump KevinJump deleted the v17/migrations-full-set-cache-policy branch March 26, 2026 19:20
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.

2 participants