LANCommander/LANCommander.Server.Data
2024-10-11 01:09:12 -05:00
..
Models Add ability to specify multiple upload folders for archives 2024-10-11 01:09:12 -05:00
DatabaseContext.cs Add ability to specify multiple upload folders for archives 2024-10-11 01:09:12 -05:00
LANCommander.Server.Data.csproj Move data and service layers to separate projects, update packages 2024-10-07 18:04:26 -05:00
ModelBuilderExtensions.cs Move data and service layers to separate projects, update packages 2024-10-07 18:04:26 -05:00
README.md Add ability to specify multiple upload folders for archives 2024-10-11 01:09:12 -05:00
Repository.cs Move data and service layers to separate projects, update packages 2024-10-07 18:04:26 -05:00

LANCommander.Server.Data

This is the main assembly for defining database schema and the database context for Entity Framework Core.

Adding Migrations

Migrations should only be added to the database provider projects. The following commands can be used to add a new migration:

dotnet ef migrations add <Migration Name> --project LANCommander.Server.Data.SQLite --startup-project LANCommander.Server
dotnet ef migrations add <Migration Name> --project LANCommander.Server.Data.MySQL --startup-project LANCommander.Server
dotnet ef migrations add <Migration Name> --project LANCommander.Server.Data.PostgreSQL --startup-project LANCommander.Server

A migration should be added to every database provider. Note that when running each of these, Settings.yml needs to be updated with the correct connection strings.