feat(db): add Postgres support to configuration

Extends database configuration to support Postgres in addition to existing SQLite and MySQL options.

Includes new settings for Postgres host, database name, username, and password.

Implements a connection builder for Postgres, ensuring proper error handling when connecting.

Updates dependency to include Npgsql for Postgres connectivity.
This commit is contained in:
Sakura Akeno Isayeki 2025-04-28 15:51:16 +02:00
parent 084411f847
commit 69b98980f1
No known key found for this signature in database
GPG key ID: BAB781B71FD2E7E6
3 changed files with 45 additions and 2 deletions

View file

@ -33,7 +33,8 @@
<PackageReference Include="MySql.Data" Version="8.4.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.11" />
<PackageReference Include="ModFramework" Version="1.1.7" GeneratePathProperty="true" /> <!-- only used to extract out to ./bin. -->
<PackageReference Include="GetText.NET" Version="1.7.14" /> <!-- only used to extract out to ./bin. -->
<PackageReference Include="GetText.NET" Version="1.7.14" />
<PackageReference Include="Npgsql" Version="6.0.13" /> <!-- only used to extract out to ./bin. -->
<!-- the launcher doesnt need the direct OTAPI reference, but since PackageReference[ExcludeFromSingleFile] doesnt work, exclude the assets and copy manually -->
<PackageReference Include="OTAPI.Upcoming" Version="3.1.20" ExcludeAssets="all" GeneratePathProperty="true" />