After the next release: drop Members.Role, make Boards.Key required #219

Closed
opened 2026-09-22 21:17:56 +00:00 by Grandiras · 0 comments
Owner

Part of #190's migration rule: the previous release can still run against the database for one release. Two columns are kept in a transitional shape for exactly that reason, and both can be finished once a release carrying #190's work has shipped. Not before: the release before it has to stay a valid rollback target.

  • Drop Members.Role (#192). Nothing reads it except DatabaseInitializer.WarnAboutUnconfiguredAdminsAsync, the one-off log line naming members the old Members page had promoted, who are no longer admins of anything but the boards they were given. Remove that method with the column, and the "deliberately gone from the entity" note in Data/Entities/Member.cs and DbAllowlistService.
  • Make Boards.Key NOT NULL (#197, AddBoardKeys). It's nullable so v2.6.0, which inserts boards without a key, can still run. DatabaseInitializer.EnsureBoardKeysAsync backfills on every boot, so by then every row has one. It can stay as a guard or go, whichever the migration makes simpler.

Both are one migration, and docs/data.md / docs/auth.md lose the sentences that explain the transition. Test against a copy of a database that went through the release in between, not a fresh one: a fresh database never had a null key.

Part of #190's migration rule: *the previous release can still run against the database for one release.* Two columns are kept in a transitional shape for exactly that reason, and both can be finished **once a release carrying #190's work has shipped**. Not before: the release before it has to stay a valid rollback target. - **Drop `Members.Role`** (#192). Nothing reads it except `DatabaseInitializer.WarnAboutUnconfiguredAdminsAsync`, the one-off log line naming members the old Members page had promoted, who are no longer admins of anything but the boards they were given. Remove that method with the column, and the "deliberately gone from the entity" note in `Data/Entities/Member.cs` and `DbAllowlistService`. - **Make `Boards.Key` `NOT NULL`** (#197, `AddBoardKeys`). It's nullable so v2.6.0, which inserts boards without a key, can still run. `DatabaseInitializer.EnsureBoardKeysAsync` backfills on every boot, so by then every row has one. It can stay as a guard or go, whichever the migration makes simpler. Both are one migration, and `docs/data.md` / `docs/auth.md` lose the sentences that explain the transition. Test against a copy of a database that went through the release in between, not a fresh one: a fresh database never had a null key.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Grandiras/Ponente#219
No description provided.