Switches the database from SQL Server to MariaDB
The target Pi only has MariaDB, and SQL Server has no ARM64 build at all - not a config problem, a real gap discovered during deployment setup. Swapped the EF Core provider, regenerated every migration, updated connection strings and the backup script everywhere they appear. Took two tries to land on a provider that actually works: Pomelo builds fine against this project's EF Core 10 packages but fails at runtime (it's compiled against 9's internal API surface, which moved in 10 wherever Identity/DataProtection force the newer packages). Oracle's official provider builds and migrates fine but has a real MariaDB bug in its own migration-lock code, reproduced against a live database. Kept Oracle's provider and worked around just that one broken method - everything else it does is correct - rather than give up more of the stack to chase a workaround. Verified against a real local MariaDB end to end: all three migrations applied, both hosts start clean, full suite still green.
This commit is contained in:
@@ -13,13 +13,18 @@ Een modulaire monolith CMS gebouwd met .NET 10.
|
||||
|
||||
### Vereisten
|
||||
- .NET 10 SDK
|
||||
- Podman of Docker (voor SQL Server)
|
||||
- Podman of Docker (voor MariaDB)
|
||||
|
||||
### 1. Database opstarten
|
||||
Start een SQL Server container met de volgende opdracht:
|
||||
Start een MariaDB-container met de volgende opdracht:
|
||||
```powershell
|
||||
podman run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<your_password>" -p 1433:1433 --name sql-server -d mcr.microsoft.com/mssql/server:2022-latest
|
||||
podman run -e "MARIADB_ROOT_PASSWORD=<your_password>" -p 3306:3306 --name mariadb -d docker.io/library/mariadb:latest
|
||||
```
|
||||
> **Migratie-notitie**: dit project draaide tot 2026-07-28 op Microsoft SQL Server. Overgestapt naar
|
||||
> MariaDB omdat de productie-Pi geen SQL Server kan draaien (geen ARM64-build bestaat) en al MariaDB
|
||||
> heeft geïnstalleerd. Zie `aidlc-docs/features/gitea-deployment-workflow/` voor de volledige
|
||||
> rationale. Bestaande lokale SQL Server-databases/migraties zijn niet compatibel — begin met een
|
||||
> verse MariaDB-database.
|
||||
|
||||
### 2. Configuratie
|
||||
De applicatie maakt gebruik van een drie-bestanden patroon voor configuratie:
|
||||
@@ -31,7 +36,7 @@ Zorg dat er een `src/SlpModularCms.Api/appsettings.local.json` aanwezig is met d
|
||||
```json
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Server=127.0.0.1,1433;User ID=sa;Password=<your_password>;Database=SlpModularCms;TrustServerCertificate=True;MultipleActiveResultSets=true"
|
||||
"DefaultConnection": "Server=127.0.0.1;Port=3306;Database=SlpModularCms;Uid=root;Pwd=<your_password>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user