Jump to content

MindAttic.Storage/MIGRATION

From MindAttic Docs

Migrating from MindAttic.Media

MindAttic.Media was renamed to MindAttic.Storage on 2026-11-24 (feature M.MDIA-T23). The API is unchanged: the public type names (IMediaStore, MediaItem, AddMedia, AddMediaAzure, MapMediaEndpoints) and the /_media endpoint stay as they were. Only the package ids, namespaces, folder and GitHub URL changed, and the package versions were reset to 1.0.0.

Old to new

What Old New
Core package MindAttic.Media 1.0.0 / 2.0.0 MindAttic.Storage 1.0.0
Azure package MindAttic.Media.Azure 1.0.0 / 2.0.0 MindAttic.Storage.Azure 1.0.0
Namespaces MindAttic.Media, MindAttic.Media.Azure MindAttic.Storage, MindAttic.Storage.Azure
Projects src\MindAttic.Media, src\MindAttic.Media.Azure, src\MindAttic.Media.Tests src\MindAttic.Storage, src\MindAttic.Storage.Azure, src\MindAttic.Storage.Tests
Solution MindAttic.Media.slnx MindAttic.Storage.slnx
Local folder D:\Projects\MindAttic\MindAttic.Media D:\Projects\MindAttic\MindAttic.Storage
GitHub github.com/mindattic/MindAttic.Media github.com/mindattic/MindAttic.Storage
Tickets repo key MindAttic.Media MindAttic.Storage (prefix stays M.MDIA)

The old MindAttic.Media*.nupkg files stay in C:\LocalNuGet so old commits still restore.

The names MindAttic.Media.Viewer and MindAttic.Media.Capture belong to other repos (the media viewer and the capture tool); they are not this library.

Moving a consumer

  1. In each .csproj, swap PackageReference Include="MindAttic.Media" for MindAttic.Storage 1.0.0 and MindAttic.Media.Azure for MindAttic.Storage.Azure 1.0.0. Point any Debug ProjectReference at ..\MindAttic.Storage\src\MindAttic.Storage\MindAttic.Storage.csproj (and MindAttic.Storage.Azure), relative to your project.
  2. Replace using MindAttic.Media with using MindAttic.Storage, and using MindAttic.Media.Azure with using MindAttic.Storage.Azure.
  3. If an EF model snapshot names the entity MindAttic.Media.MediaItem, change it to MindAttic.Storage.MediaItem in the snapshot only; leave old migration *.Designer.cs files as they are. The table and columns don't change.
  4. Build.

Consumers moved

Consumer Change Tickets Commits
MindAttic.Storage (this repo) Projects, solution, namespaces, package ids; GitHub repo, folder and tickets key; README M.MDIA-T26, M.MDIA-T28, M.MDIA-T29 d73f2c1, 0d2c5ec, 483acda
IdeaCms MindAttic.Media(.Azure) 2.0.0 to MindAttic.Storage(.Azure) 1.0.0: package and Debug project references, namespaces; docs IDEA-T72, IDEA-T73, IDEA-T74 f84c0ac, a06eec2
Prose MindAttic.Media(.Azure) 1.0.0 to MindAttic.Storage(.Azure) 1.0.0: package ids, namespaces, EF snapshot entity name, vendored nupkgs PRS-T1122, PRS-T1123 4805e2254
Gadfly Comments only (no package reference) GAD-T732, GAD-T733 91e7a1f
MindAttic.Export Docs and XML comments M.EXPT-T45, M.EXPT-T46 1f4e2c5
MindAttic.Log docs/MIGRATION.md row M.LOGS-T35, M.LOGS-T36 d93f8f7
MindAttic.Agency Legacy rules: MindAttic.Media__CLAUDE.md became MindAttic.Storage__CLAUDE.md MAT-T196 49d25cd
Workspace root docs/workspace-repos.json entry, legacy rules mirror, command catalog MAT-T199 30f3e95, 214d424

The closing sweep (M.MDIA-T30) searched every repo for MindAttic\.Media(\.Azure)?([^.A-Za-z]|$). What still matches is dated record: ticket rows and descriptions, the Orchestrator's usage and test history, and design notes written before the rename.

Switching off MindAttic.Storage.Azure

MindAttic's Azure resources were decommissioned on 2026-11-26, so MindAttic.Storage.Azure 1.0.0 is frozen: it stays on C:\LocalNuGet for the consumers below, gets no new work, and is removed in 2.0.0 (M.MDIA-T54, MS-154) once none of them references it. Two consumers still do:

Consumer Where it references Storage.Azure Its follow-up
Prose (Prose.Core) PackageReference MindAttic.Storage.Azure 1.0.0 in src/Prose.Core/Prose.Core.csproj, beside its own Azure.Storage.Blobs audio store; media already registers AddMedia<ProseDbContext>() PRS-T1408
IdeaCms (IdeaCms.Blazor) PackageReference and Debug ProjectReference to MindAttic.Storage.Azure in src/IdeaCms.Blazor/IdeaCms.Blazor.csproj; Media:Provider=azure calls AddMediaAzure<TContext> in Services/MediaProviderSetup.cs IDEA-T213

To switch, in each consumer:

  1. Register the local store and give it a folder: services.AddMedia<TContext>(o => o.MediaRoot = mediaRoot); in place of AddMediaAzure<TContext>(...). MediaRoot is the folder for payloads above InlineThresholdBytes (2 MB); smaller ones stay inline in the MediaItem row. Keep app.MapMediaEndpoints(); as it is: without a registered IMediaUrlSigner, /_media/{uid} streams the file itself with Range, ETag and Cache-Control.
  2. Drop the Azure-only settings (ConnectionString, BlobServiceUri, ContainerName, PublicRead, PublicBaseUri, UploadBlockSizeBytes and SignedUrlLifetime) and any Media:Provider=azure branch that sets them.
  3. Remove PackageReference Include="MindAttic.Storage.Azure" (and its Debug ProjectReference) and using MindAttic.Storage.Azure; reference MindAttic.Storage 1.0.0 instead if the project did not already.
  4. Build. The MediaItem table does not change. Rows already uploaded to blob storage keep their blob URL and are redirected to it, which no longer resolves now that the account is gone; re-upload any of them that are still needed.
From MindAttic.Storage/docs/MIGRATION.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.