# 20260514184243_AddDescriptionToEbook.Designer

- File ID: file:1vkv6ym:20260514184243-adddescriptiontoebook-designer-cs
- Path: NexusReader.Data/Persistence/Migrations/20260514184243_AddDescriptionToEbook.Designer.cs
- Role: database-config
- Layer: data

## Purpose

EF Core migration designer for 'AddDescriptionToEbook' that defines the target EF Core model snapshot (tables, columns, keys, indexes, relationships) and seeds subscription plan data for the database migration.

## Key Details

This migration snapshot registers the Postgres 'vector' extension (pgvector), configures vector columns for embeddings, extends AspNetUsers with subscription and AI token tracking, and seeds four subscription plans; it also adds a Description column to the Ebook table schema.

## Symbols

- AddDescriptionToEbook: EF Core migration designer for 'AddDescriptionToEbook' that defines the target EF Core model snapshot (tables, columns, keys, indexes, relationships) and seeds subscription plan data for the database migration.
- BuildTargetModel(): Builds the EF Core model snapshot used by this migration: applies annotations, extensions, entity/table/property/index/relationship mappings and data seeding.
- AddDescriptionToEbook: Partial EF Core Migration class that contains the BuildTargetModel snapshot for the 'AddDescriptionToEbook' migration.

## Dependencies

- imports NexusReader.Data/Persistence/AppDbContext.cs
- imports NexusReader.Domain/Entities/Author.cs
- imports NexusReader.Domain/Entities/Ebook.cs
- imports NexusReader.Domain/Entities/KnowledgeUnit.cs
- imports NexusReader.Domain/Entities/KnowledgeUnitLink.cs
- imports NexusReader.Domain/Entities/NexusUser.cs
- imports NexusReader.Domain/Entities/QuizResult.cs
- imports NexusReader.Domain/Entities/SemanticKnowledgeCache.cs
- imports NexusReader.Domain/Entities/SubscriptionPlan.cs

## Calls

- No resolved calls.

## Coverage

- Symbols: 3
- Executable symbols: 1
- Executable symbols with control flow: 1
- Grounded edges: 12
- Unresolved references: 0
- Control-flow fragments: 1
- Unresolved jumps: 0
- Unsupported constructs: 0
- Control-flow coverage: 100%
- Required diagrams: 2
- Generated diagrams: 2

## Control Flow Fragments

- BuildTargetModel: 18 nodes, 17 edges, 0 jumps, 0 unsupported constructs

## Diagrams

### 20260514184243_AddDescriptionToEbook.Designer Neighborhood

_Warnings: diagram file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs_neighborhood_view exceeds preferred complexity thresholds (13 nodes, 9 edges)._

```mermaid
---
config:
  flowchart:
    defaultRenderer: "elk"
---
flowchart LR
    class_tfj298_adddescriptiontoebook("AddDescriptionToEbook")
    file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs("20260514184243_AddDescriptionToEbook.Designer")
    method_13h9yo2_buildtargetmodel[["BuildTargetModel()"]]
    file_1b03oou_subscriptionplan_cs[/"SubscriptionPlan"/]
    file_1d4ycw2_semanticknowledgecache_cs[/"SemanticKnowledgeCache"/]
    file_1m6x5qy_knowledgeunitlink_cs[/"KnowledgeUnitLink"/]
    file_1pacvtg_appdbcontext_cs[/"AppDbContext"/]
    file_1wyr0y8_quizresult_cs[/"QuizResult"/]
    file_1y56eud_author_cs[/"Author"/]
    file_h6a0xu_knowledgeunit_cs[/"KnowledgeUnit"/]
    file_lcvwj6_ebook_cs[/"Ebook"/]
    file_xcxh5w_nexususer_cs[/"NexusUser"/]
    type_52venu_adddescriptiontoebook[/"AddDescriptionToEbook"/]
    file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs -->|SubscriptionPlan| file_1b03oou_subscriptionplan_cs
    file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs -->|SemanticKnowledgeCache| file_1d4ycw2_semanticknowledgecache_cs
    file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs -->|KnowledgeUnitLink| file_1m6x5qy_knowledgeunitlink_cs
    file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs -->|AppDbContext| file_1pacvtg_appdbcontext_cs
    file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs -->|QuizResult| file_1wyr0y8_quizresult_cs
    file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs -->|Author| file_1y56eud_author_cs
    file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs -->|KnowledgeUnit| file_h6a0xu_knowledgeunit_cs
    file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs -->|Ebook| file_lcvwj6_ebook_cs
    file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs -->|NexusUser| file_xcxh5w_nexususer_cs
```

### 20260514184243_AddDescriptionToEbook.Designer Execution Overview

```mermaid
flowchart TD
    class_tfj298_adddescriptiontoebook("AddDescriptionToEbook")
    method_13h9yo2_buildtargetmodel[["BuildTargetModel()"]]
    class_tfj298_adddescriptiontoebook -->|contains| method_13h9yo2_buildtargetmodel
```

## Diagram Validation

- Status: warn
- Warning: neighborhood-view: diagram file_1vkv6ym_20260514184243_adddescriptiontoebook_designer_cs_neighborhood_view exceeds preferred complexity thresholds (13 nodes, 9 edges).
