Skip to content

Commit

Permalink
Start to support oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
thabart committed Jun 20, 2024
1 parent bf3addd commit dc2f79c
Show file tree
Hide file tree
Showing 9 changed files with 8,614 additions and 4 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Oracle.EntityFrameworkCore" Version="8.23.40" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SimpleIdServer.IdServer.Store.EF\SimpleIdServer.IdServer.Store.EF.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ public enum DistributedCacheTypes
REDIS = 2,
POSTGRE = 3,
MYSQL = 4,
SQLITE = 5
SQLITE = 5,
ORACLE = 6
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public enum StorageTypes
SQLSERVER = 1,
POSTGRE = 2,
MYSQL = 3,
SQLITE = 4
SQLITE = 4,
ORACLE = 5
}
}
7 changes: 7 additions & 0 deletions src/IdServer/SimpleIdServer.IdServer.Startup/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ void ConfigureStorage(DbContextOptionsBuilder b)
var conf = section.Get<StorageConfiguration>();
switch (conf.Type)
{
case StorageTypes.ORACLE:
b.UseOracle(conf.ConnectionString, o =>
{
o.MigrationsAssembly("SimpleIdServer.IdServer.OracleMigrations");
o.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery);
});
break;
case StorageTypes.SQLSERVER:
b.UseSqlServer(conf.ConnectionString, o =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ProjectReference Include="..\SimpleIdServer.IdServer.MySQLMigrations\SimpleIdServer.IdServer.MySQLMigrations.csproj" />
<ProjectReference Include="..\SimpleIdServer.IdServer.Notification.Fcm\SimpleIdServer.IdServer.Notification.Fcm.csproj" />
<ProjectReference Include="..\SimpleIdServer.IdServer.Notification.Gotify\SimpleIdServer.IdServer.Notification.Gotify.csproj" />
<ProjectReference Include="..\SimpleIdServer.IdServer.OracleMigrations\SimpleIdServer.IdServer.OracleMigrations.csproj" />
<ProjectReference Include="..\SimpleIdServer.IdServer.Otp\SimpleIdServer.IdServer.Otp.csproj" />
<ProjectReference Include="..\SimpleIdServer.IdServer.PostgreMigrations\SimpleIdServer.IdServer.PostgreMigrations.csproj" />
<ProjectReference Include="..\SimpleIdServer.IdServer.Provisioning.LDAP\SimpleIdServer.IdServer.Provisioning.LDAP.csproj" />
Expand All @@ -30,6 +31,7 @@
<ProjectReference Include="..\SimpleIdServer.IdServer\SimpleIdServer.IdServer.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Oracle.EntityFrameworkCore" Version="8.23.40" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Facebook" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.4" />
Expand Down
4 changes: 2 additions & 2 deletions src/IdServer/SimpleIdServer.IdServer.Startup/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"SCIMBaseUrl": "https://localhost:5003",
"Authority": "https://localhost:5001",
"DistributedCacheConfiguration": {
"Type": "SQLSERVER",
"Type": "ORACLE",
"ConnectionString": "Data Source=.;Initial Catalog=IdServer;Integrated Security=True;TrustServerCertificate=True",
"InstanceName": ""
},
"StorageConfiguration": {
"Type": "SQLSERVER",
"Type": "ORACLE",
"ConnectionString": "Data Source=.;Initial Catalog=IdServer;Integrated Security=True;TrustServerCertificate=True"
},
"Facebook": {
Expand Down

0 comments on commit dc2f79c

Please sign in to comment.