docs: sync portfolio task 1 review indexes

This commit is contained in:
2026-06-01 10:04:44 +03:00
parent f7a12d14d2
commit 536061f63c
2 changed files with 16 additions and 0 deletions
@@ -29,6 +29,9 @@
- `src/GmRelay.Web/Components/Pages/PortfolioEditor.razor`
- `src/GmRelay.Web/Components/Pages/PublicPortfolio.razor`
- `tests/GmRelay.Bot.Tests/Web/PortfolioMigrationTests.cs`
- `tests/GmRelay.Bot.Tests/Web/PortfolioSessionDeletionSourceTests.cs`
- `tests/GmRelay.Bot.Tests/Web/PortfolioMigrationPostgresFixture.cs`
- `tests/GmRelay.Bot.Tests/Web/PortfolioMigrationPostgresTests.cs`
- `tests/GmRelay.Bot.Tests/Web/PortfolioContractsTests.cs`
- `tests/GmRelay.Bot.Tests/Web/PortfolioValidationTests.cs`
- `tests/GmRelay.Bot.Tests/Web/LocalPortfolioCoverStorageTests.cs`
@@ -39,6 +42,10 @@
**Modify**
- `src/GmRelay.Shared/Features/Sessions/ListSessions/DeleteSessionHandler.cs`
- `src/GmRelay.DiscordBot/Features/Sessions/DiscordDeleteSessionHandler.cs`
- `tests/GmRelay.Bot.Tests/GmRelay.Bot.Tests.csproj`
- `tests/GmRelay.Bot.Tests/packages.lock.json`
- `src/GmRelay.Web/Program.cs`
- `src/GmRelay.Web/appsettings.Development.json`
- `src/GmRelay.Web/Dockerfile`
@@ -334,6 +341,13 @@ CREATE TABLE portfolio_game_reviews (
UNIQUE (portfolio_game_id, author_player_id)
);
CREATE INDEX ix_portfolio_game_reviews_author
ON portfolio_game_reviews (author_player_id);
CREATE INDEX ix_portfolio_game_reviews_moderator
ON portfolio_game_reviews (moderated_by_player_id)
WHERE moderated_by_player_id IS NOT NULL;
CREATE INDEX ix_portfolio_game_reviews_public
ON portfolio_game_reviews (portfolio_game_id, created_at DESC)
WHERE moderation_status = 'Approved' AND publication_consent_at IS NOT NULL;
@@ -126,6 +126,8 @@ CHECK (moderation_status IN ('Pending', 'Approved', 'Rejected', 'Hidden'))
UNIQUE (portfolio_game_id, author_player_id)
```
- Author lookup index `ix_portfolio_game_reviews_author` on `(author_player_id)`.
- Partial moderator lookup index `ix_portfolio_game_reviews_moderator` on `(moderated_by_player_id)` where `moderated_by_player_id IS NOT NULL`.
- Partial public index on `(portfolio_game_id, created_at DESC)` where `moderation_status = 'Approved'` and `publication_consent_at IS NOT NULL`.
- Partial moderation index on `(portfolio_game_id, created_at DESC)` where `moderation_status = 'Pending'`.