|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
This shall provide context on how to work with entity frameworks multi provider migration feature.
|
|
|
|
|
|
-Jellyfin supports multiple database providers, namely SqLite as its default and the experimental postgresSQL.
|
|
|
+Jellyfin will in the future support multiple database providers, namely SqLite as its default and the experimental postgresSQL.
|
|
|
|
|
|
Each provider has its own set of migrations, as they contain provider specific instructions to migrate the specific changes to their respective systems.
|
|
|
|
|
@@ -12,13 +12,12 @@ When creating a new migration, you always have to create migrations for all prov
|
|
|
dotnet ef migrations add MIGRATION_NAME --project "PATH_TO_PROJECT" -- --provider PROVIDER_KEY
|
|
|
```
|
|
|
|
|
|
-with both sqlite and pgsql currently beeing supported and both need migrations, you need to run the Entity Framework tool with the correct project to tell EFCore where to store the migrations and the correct provider key to tell jellyfin to load that provider.
|
|
|
+with sqlite currently beeing supported and, you need to run the Entity Framework tool with the correct project to tell EFCore where to store the migrations and the correct provider key to tell jellyfin to load that provider.
|
|
|
|
|
|
The example is made from the root folder of the project e.g for codespaces `/workspaces/jellyfin`
|
|
|
|
|
|
```cmd
|
|
|
dotnet ef migrations add {MIGRATION_NAME} --project "Jellyfin.Database/Jellyfin.Database.Providers.SqLite" -- --migration-provider Jellyfin-SQLite
|
|
|
-dotnet ef migrations add {MIGRATION_NAME} --project "Jellyfin.Database/Jellyfin.Database.Providers.PgSql" -- --migration-provider Jellyfin-PgSql
|
|
|
```
|
|
|
|
|
|
If you get the error: `Run "dotnet tool restore" to make the "dotnet-ef" command available.` Run `dotnet restore`.
|