Add automatic PostgreSQL database creation and migration
- Added Jellyfin.Database.Providers.Postgres project with full EF Core migration support for PostgreSQL. - Implemented automatic database creation and privilege assignment on startup. - Generated initial migration and model snapshot for PostgreSQL schema. - Updated build, test, and dependency files to include PostgreSQL provider and Npgsql packages. - Added PowerShell script for generating and testing PostgreSQL migrations. - No changes to application logic outside database provider/migration infrastructure.
This commit is contained in:
@@ -568,6 +568,40 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Npgsql/10.0.0": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.Logging.Abstractions": "10.0.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net10.0/Npgsql.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net10.0/Npgsql.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Npgsql.EntityFrameworkCore.PostgreSQL/11.0.0-preview.1": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.EntityFrameworkCore": "[11.0.0-preview.1.26104.118]",
|
||||
"Microsoft.EntityFrameworkCore.Relational": "[11.0.0-preview.1.26104.118]",
|
||||
"Npgsql": "10.0.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net11.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net11.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Polly/8.6.5": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
@@ -881,6 +915,24 @@
|
||||
"bin/placeholder/Jellyfin.Database.Implementations.dll": {}
|
||||
}
|
||||
},
|
||||
"Jellyfin.Database.Providers.Postgres/1.0.0": {
|
||||
"type": "project",
|
||||
"framework": ".NETCoreApp,Version=v11.0",
|
||||
"dependencies": {
|
||||
"Jellyfin.CodeAnalysis": "1.0.0",
|
||||
"Jellyfin.Common": "10.12.0",
|
||||
"Jellyfin.Database.Implementations": "10.11.0",
|
||||
"Microsoft.EntityFrameworkCore": "11.0.0-preview.1.26104.118",
|
||||
"Microsoft.EntityFrameworkCore.Relational": "11.0.0-preview.1.26104.118",
|
||||
"Npgsql.EntityFrameworkCore.PostgreSQL": "11.0.0-preview.1"
|
||||
},
|
||||
"compile": {
|
||||
"bin/placeholder/Jellyfin.Database.Providers.Postgres.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"bin/placeholder/Jellyfin.Database.Providers.Postgres.dll": {}
|
||||
}
|
||||
},
|
||||
"Jellyfin.Database.Providers.Sqlite/1.0.0": {
|
||||
"type": "project",
|
||||
"framework": ".NETCoreApp,Version=v11.0",
|
||||
@@ -1868,6 +1920,40 @@
|
||||
"nebml.nuspec"
|
||||
]
|
||||
},
|
||||
"Npgsql/10.0.0": {
|
||||
"sha512": "xZAYhPOU2rUIFpV48xsqhCx9vXs6Y+0jX2LCoSEfDFYMw9jtAOUk3iQsCnDLrFIv9NT3JGMihn7nnuZsPKqJmA==",
|
||||
"type": "package",
|
||||
"path": "npgsql/10.0.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"README.md",
|
||||
"lib/net10.0/Npgsql.dll",
|
||||
"lib/net10.0/Npgsql.xml",
|
||||
"lib/net8.0/Npgsql.dll",
|
||||
"lib/net8.0/Npgsql.xml",
|
||||
"lib/net9.0/Npgsql.dll",
|
||||
"lib/net9.0/Npgsql.xml",
|
||||
"npgsql.10.0.0.nupkg.sha512",
|
||||
"npgsql.nuspec",
|
||||
"postgresql.png"
|
||||
]
|
||||
},
|
||||
"Npgsql.EntityFrameworkCore.PostgreSQL/11.0.0-preview.1": {
|
||||
"sha512": "zpg0hmbw7f3B0deg1vENgqfNWuas3lcR6c8D7VNwa7HxNLnnNcXp4ABf5ywUYjZzAJOToCy5UH0VV9rtnxWcKQ==",
|
||||
"type": "package",
|
||||
"path": "npgsql.entityframeworkcore.postgresql/11.0.0-preview.1",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"README.md",
|
||||
"lib/net11.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll",
|
||||
"lib/net11.0/Npgsql.EntityFrameworkCore.PostgreSQL.xml",
|
||||
"npgsql.entityframeworkcore.postgresql.11.0.0-preview.1.nupkg.sha512",
|
||||
"npgsql.entityframeworkcore.postgresql.nuspec",
|
||||
"postgresql.png"
|
||||
]
|
||||
},
|
||||
"Polly/8.6.5": {
|
||||
"sha512": "VqtW2ZE/ALvQMAH1cQY3qZ2cF2OXa3oe/HKMdOv6Q02HCoEW0rsFNfcBONXlHBe1TnjWW1vdRxBEkPeq0/2FHA==",
|
||||
"type": "package",
|
||||
@@ -2141,6 +2227,11 @@
|
||||
"path": "../src/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj",
|
||||
"msbuildProject": "../src/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj"
|
||||
},
|
||||
"Jellyfin.Database.Providers.Postgres/1.0.0": {
|
||||
"type": "project",
|
||||
"path": "../src/Jellyfin.Database/Jellyfin.Database.Providers.Postgres/Jellyfin.Database.Providers.Postgres.csproj",
|
||||
"msbuildProject": "../src/Jellyfin.Database/Jellyfin.Database.Providers.Postgres/Jellyfin.Database.Providers.Postgres.csproj"
|
||||
},
|
||||
"Jellyfin.Database.Providers.Sqlite/1.0.0": {
|
||||
"type": "project",
|
||||
"path": "../src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj",
|
||||
@@ -2175,6 +2266,7 @@
|
||||
"Jellyfin.Controller >= 10.12.0",
|
||||
"Jellyfin.Data >= 10.12.0",
|
||||
"Jellyfin.Database.Implementations >= 10.11.0",
|
||||
"Jellyfin.Database.Providers.Postgres >= 1.0.0",
|
||||
"Jellyfin.Database.Providers.Sqlite >= 1.0.0",
|
||||
"Jellyfin.Model >= 10.12.0",
|
||||
"Jellyfin.Sdk >= 2025.10.21",
|
||||
@@ -2234,6 +2326,9 @@
|
||||
"E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Database\\Jellyfin.Database.Implementations\\Jellyfin.Database.Implementations.csproj": {
|
||||
"projectPath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Database\\Jellyfin.Database.Implementations\\Jellyfin.Database.Implementations.csproj"
|
||||
},
|
||||
"E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Database\\Jellyfin.Database.Providers.Postgres\\Jellyfin.Database.Providers.Postgres.csproj": {
|
||||
"projectPath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Database\\Jellyfin.Database.Providers.Postgres\\Jellyfin.Database.Providers.Postgres.csproj"
|
||||
},
|
||||
"E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Database\\Jellyfin.Database.Providers.Sqlite\\Jellyfin.Database.Providers.Sqlite.csproj": {
|
||||
"projectPath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Database\\Jellyfin.Database.Providers.Sqlite\\Jellyfin.Database.Providers.Sqlite.csproj"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user