Add loading state and database migration support

- Updated `Documents.razor` to show a loading spinner when documents are being fetched, introducing an `isLoading` state variable.
- Added `ConfigureDatabaseAsync` method in `Program.cs` for handling database migrations at startup.
- Modified `SqlDatabaseVectorSearch.csproj` to include `Microsoft.EntityFrameworkCore.Tools` for migration management.
- Enhanced documentation in `docs.md` regarding the `Dimensions` property and `VECTOR` column size requirements.
- Created initial migration files to define the database schema for `Documents` and `DocumentChunks` tables.
- Defined `Document` and `DocumentChunk` entities in migration files for data storage and retrieval.
This commit is contained in:
Marco Minerva
2025-02-24 12:01:22 +01:00
parent 08ebc517c8
commit a0a6df9cb3
7 changed files with 285 additions and 17 deletions
@@ -14,6 +14,10 @@
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.1.3" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.Hybrid" Version="9.2.0-preview.1.25105.6" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.2.0" />
<PackageReference Include="Microsoft.ML.Tokenizers" Version="1.0.1" />