From dc2f79ca1d38bd00c2646bf5e38145988ea0bfc0 Mon Sep 17 00:00:00 2001 From: thabart Date: Thu, 20 Jun 2024 21:14:23 +0200 Subject: [PATCH] Start to support oracle --- .../20240620191230_Init.Designer.cs | 3231 +++++++++++++++++ .../Migrations/20240620191230_Init.cs | 2126 +++++++++++ .../Migrations/StoreDbContextModelSnapshot.cs | 3228 ++++++++++++++++ ...eIdServer.IdServer.OracleMigrations.csproj | 14 + .../DistributedCacheConfiguration.cs | 3 +- .../Configurations/StorageConfiguration.cs | 3 +- .../Program.cs | 7 + .../SimpleIdServer.IdServer.Startup.csproj | 2 + .../appsettings.json | 4 +- 9 files changed, 8614 insertions(+), 4 deletions(-) create mode 100644 src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/20240620191230_Init.Designer.cs create mode 100644 src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/20240620191230_Init.cs create mode 100644 src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/StoreDbContextModelSnapshot.cs create mode 100644 src/IdServer/SimpleIdServer.IdServer.OracleMigrations/SimpleIdServer.IdServer.OracleMigrations.csproj diff --git a/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/20240620191230_Init.Designer.cs b/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/20240620191230_Init.Designer.cs new file mode 100644 index 000000000..3c37ca8ae --- /dev/null +++ b/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/20240620191230_Init.Designer.cs @@ -0,0 +1,3231 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Oracle.EntityFrameworkCore.Metadata; +using SimpleIdServer.IdServer.Store.EF; + +#nullable disable + +namespace SimpleIdServer.IdServer.OracleMigrations.Migrations +{ + [DbContext(typeof(StoreDbContext))] + [Migration("20240620191230_Init")] + partial class Init + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + OracleModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("ApiResourceRealm", b => + { + b.Property("ApiResourcesId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("ApiResourcesId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("ApiResourceRealm"); + }); + + modelBuilder.Entity("ApiResourceScope", b => + { + b.Property("ApiResourcesId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ScopesId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("ApiResourcesId", "ScopesId"); + + b.HasIndex("ScopesId"); + + b.ToTable("ApiResourceScope"); + }); + + modelBuilder.Entity("AuthenticationContextClassReferenceRealm", b => + { + b.Property("AuthenticationContextClassReferencesId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("AuthenticationContextClassReferencesId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("AuthenticationContextClassReferenceRealm"); + }); + + modelBuilder.Entity("AuthenticationSchemeProviderRealm", b => + { + b.Property("AuthenticationSchemeProvidersId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("AuthenticationSchemeProvidersId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("AuthenticationSchemeProviderRealm"); + }); + + modelBuilder.Entity("CertificateAuthorityRealm", b => + { + b.Property("CertificateAuthoritiesId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("CertificateAuthoritiesId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("CertificateAuthorityRealm"); + }); + + modelBuilder.Entity("ClientRealm", b => + { + b.Property("ClientsId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("ClientsId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("ClientRealm"); + }); + + modelBuilder.Entity("ClientScope", b => + { + b.Property("ClientsId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ScopesId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("ClientsId", "ScopesId"); + + b.HasIndex("ScopesId"); + + b.ToTable("ClientScope"); + }); + + modelBuilder.Entity("ConfigurationDefinitionRecordTranslation", b => + { + b.Property("ConfigurationDefinitionRecordId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("TranslationsId") + .HasColumnType("NUMBER(10)"); + + b.HasKey("ConfigurationDefinitionRecordId", "TranslationsId"); + + b.HasIndex("TranslationsId"); + + b.ToTable("ConfigurationDefinitionRecordTranslation"); + }); + + modelBuilder.Entity("ConfigurationDefinitionRecordValueTranslation", b => + { + b.Property("ConfigurationDefinitionRecordValueId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("TranslationsId") + .HasColumnType("NUMBER(10)"); + + b.HasKey("ConfigurationDefinitionRecordValueId", "TranslationsId"); + + b.HasIndex("TranslationsId"); + + b.ToTable("ConfigurationDefinitionRecordValueTranslation"); + }); + + modelBuilder.Entity("GroupScope", b => + { + b.Property("GroupsId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RolesId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("GroupsId", "RolesId"); + + b.HasIndex("RolesId"); + + b.ToTable("GroupScope"); + }); + + modelBuilder.Entity("IdentityProvisioningRealm", b => + { + b.Property("IdentityProvisioningLstId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("IdentityProvisioningLstId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("IdentityProvisioningRealm"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.DataProtectionKey", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("FriendlyName") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Xml") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.ToTable("DataProtectionKeys"); + }); + + modelBuilder.Entity("RealmScope", b => + { + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ScopesId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("RealmsName", "ScopesId"); + + b.HasIndex("ScopesId"); + + b.ToTable("RealmScope"); + }); + + modelBuilder.Entity("RealmSerializedFileKey", b => + { + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("SerializedFileKeysId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("RealmsName", "SerializedFileKeysId"); + + b.HasIndex("SerializedFileKeysId"); + + b.ToTable("RealmSerializedFileKey"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ApiResource", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Audience") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "aud"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Id"); + + b.ToTable("ApiResources"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuditEvent", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AuthMethod") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "auth_method"); + + b.Property("Claims") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "claims"); + + b.Property("ClientId") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "client_id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Description") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("ErrorMessage") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "error_message"); + + b.Property("EventName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("IsError") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_error"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "realm"); + + b.Property("RedirectUrl") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "redirect_url"); + + b.Property("RequestJSON") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "request_json"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "scopes"); + + b.Property("UserName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "username"); + + b.HasKey("Id"); + + b.ToTable("AuditEvents"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationContextClassReference", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AuthenticationMethodReferences") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "amrs"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("DisplayName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "display_name"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("RegistrationWorkflowId") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "workflow_id"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Id"); + + b.HasIndex("RegistrationWorkflowId"); + + b.ToTable("Acrs"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProvider", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("AuthSchemeProviderDefinitionName") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("DisplayName") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.HasIndex("AuthSchemeProviderDefinitionName"); + + b.ToTable("AuthenticationSchemeProviders"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProviderDefinition", b => + { + b.Property("Name") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("HandlerFullQualifiedName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "handler_full_qualifiedname"); + + b.Property("Image") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "img"); + + b.Property("OptionsFullQualifiedName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "options_full_qualifiedname"); + + b.Property("OptionsName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "options_name"); + + b.HasKey("Name"); + + b.ToTable("AuthenticationSchemeProviderDefinitions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProviderMapper", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("IdProviderId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("MapperType") + .HasColumnType("NUMBER(10)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("SourceClaimName") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("TargetUserAttribute") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("TargetUserProperty") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("IdProviderId"); + + b.ToTable("AuthenticationSchemeProviderMapper"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthorizedResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Audience") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("AuthorizedScopeId") + .HasColumnType("NUMBER(10)"); + + b.Property("Resource") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizedScopeId"); + + b.ToTable("AuthorizedResource"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthorizedScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConsentId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Scope") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "scope"); + + b.HasKey("Id"); + + b.HasIndex("ConsentId"); + + b.ToTable("AuthorizedScope"); + + b.HasAnnotation("Relational:JsonPropertyName", "scopes"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.BCAuthorize", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ClientId") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ExpirationDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Interval") + .HasColumnType("NUMBER(10)"); + + b.Property("LastStatus") + .HasColumnType("NUMBER(10)"); + + b.Property("NextFetchTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("NotificationEdp") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("NotificationMode") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("NotificationToken") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("RejectionSentDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("SerializedAuthorizationDetails") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("UserId") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.ToTable("BCAuthorizeLst"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.BCAuthorizeHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BCAuthorizeId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("EndDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Message") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("StartDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Status") + .HasColumnType("NUMBER(10)"); + + b.HasKey("Id"); + + b.HasIndex("BCAuthorizeId"); + + b.ToTable("BCAuthorizeHistory"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.CertificateAuthority", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("EndDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "end_datetime"); + + b.Property("FindType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "find_type"); + + b.Property("FindValue") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "find_value"); + + b.Property("PrivateKey") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "private_key"); + + b.Property("PublicKey") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "public_key"); + + b.Property("Source") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "source"); + + b.Property("StartDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "start_datetime"); + + b.Property("StoreLocation") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "store_location"); + + b.Property("StoreName") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "store_name"); + + b.Property("SubjectName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "subject_name"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Id"); + + b.ToTable("CertificateAuthorities"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ClaimProvider", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ClaimType") + .HasColumnType("NUMBER(10)"); + + b.Property("ConnectionString") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ProviderType") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.ToTable("ClaimProviders"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Client", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AccessTokenType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "access_token_type"); + + b.Property("ApplicationType") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "application_type"); + + b.Property("AuthReqIdExpirationTimeInSeconds") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "auth_reqid_expirationtime"); + + b.Property("AuthenticationContextClassReferenceId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("AuthorizationDataTypes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "authorization_data_types"); + + b.Property("AuthorizationEncryptedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "authorization_encrypted_response_alg"); + + b.Property("AuthorizationEncryptedResponseEnc") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "authorization_encrypted_response_enc"); + + b.Property("AuthorizationSignedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "authorization_signed_response_alg"); + + b.Property("BCAuthenticationRequestSigningAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_authentication_request_signing_alg"); + + b.Property("BCClientNotificationEndpoint") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_client_notification_endpoint"); + + b.Property("BCIntervalSeconds") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "bc_interval"); + + b.Property("BCTokenDeliveryMode") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_token_delivery_mode"); + + b.Property("BCUserCodeParameter") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_user_code_parameter"); + + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_logout_session_required"); + + b.Property("BackChannelLogoutUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_logout_uri"); + + b.Property("CNonceExpirationTimeInSeconds") + .HasColumnType("BINARY_DOUBLE"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "client_id"); + + b.Property("ClientSecret") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "client_secret"); + + b.Property("ClientSecretExpirationTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "client_secret_expires_at"); + + b.Property("ClientType") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "client_type"); + + b.Property("Contacts") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "contacts"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("CredentialOfferEndpoint") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "credential_offer_endpoint"); + + b.Property("DPOPBoundAccessTokens") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "dpop_bound_access_tokens"); + + b.Property("DPOPNonceLifetimeInSeconds") + .HasColumnType("BINARY_DOUBLE") + .HasAnnotation("Relational:JsonPropertyName", "dpop_lifetime"); + + b.Property("DefaultAcrValues") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "default_acr_values"); + + b.Property("DefaultMaxAge") + .HasColumnType("BINARY_DOUBLE") + .HasAnnotation("Relational:JsonPropertyName", "default_max_age"); + + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "frontchannel_logout_session_required"); + + b.Property("FrontChannelLogoutUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "frontchannel_logout_uri"); + + b.Property("GrantTypes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "grant_types"); + + b.Property("IdTokenEncryptedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "id_token_encrypted_response_alg"); + + b.Property("IdTokenEncryptedResponseEnc") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "id_token_encrypted_response_enc"); + + b.Property("IdTokenSignedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "id_token_signed_response_alg"); + + b.Property("InitiateLoginUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "initiate_login_uri"); + + b.Property("IsConsentDisabled") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_consent_disabled"); + + b.Property("IsDPOPNonceRequired") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "dpop_nonce_required"); + + b.Property("IsRedirectUrlCaseSensitive") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_redirect_url_casesensitive"); + + b.Property("IsResourceParameterRequired") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_resource_parameter_required"); + + b.Property("IsTokenExchangeEnabled") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_token_exchange_enabled"); + + b.Property("IsTransactionCodeRequired") + .HasColumnType("BOOLEAN"); + + b.Property("JwksUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "jwks_uri"); + + b.Property("PairWiseIdentifierSalt") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PostLogoutRedirectUris") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "post_logout_redirect_uris"); + + b.Property("PreAuthCodeExpirationTimeInSeconds") + .HasColumnType("BINARY_DOUBLE") + .HasAnnotation("Relational:JsonPropertyName", "pre_auth_code_expiration_time"); + + b.Property("PreferredTokenProfile") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "preferred_token_profile"); + + b.Property("RedirectToRevokeSessionUI") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "redirect_revoke_session_ui"); + + b.Property("RedirectionUrls") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "redirect_uris"); + + b.Property("RefreshTokenExpirationTimeInSeconds") + .HasColumnType("BINARY_DOUBLE") + .HasAnnotation("Relational:JsonPropertyName", "refresh_token_expiration_time_seconds"); + + b.Property("RegistrationAccessToken") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "registration_access_token"); + + b.Property("RequestObjectEncryptionAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "request_object_encryption_alg"); + + b.Property("RequestObjectEncryptionEnc") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "request_object_encryption_enc"); + + b.Property("RequestObjectSigningAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "request_object_signing_alg"); + + b.Property("RequireAuthTime") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "require_auth_time"); + + b.Property("ResponseTypes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "response_types"); + + b.Property("SectorIdentifierUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "sector_identifier_uri"); + + b.Property("SerializedParameters") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("SoftwareId") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "software_id"); + + b.Property("SoftwareVersion") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "software_version"); + + b.Property("SubjectType") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "subject_type"); + + b.Property("TlsClientAuthSanDNS") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_auth_san_dns"); + + b.Property("TlsClientAuthSanEmail") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_auth_san_email"); + + b.Property("TlsClientAuthSanIP") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_auth_san_ip"); + + b.Property("TlsClientAuthSanURI") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_auth_san_uri"); + + b.Property("TlsClientAuthSubjectDN") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_auth_subject_dn"); + + b.Property("TlsClientCertificateBoundAccessToken") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_certificate_bound_access_token"); + + b.Property("TokenEncryptedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "token_encrypted_response_alg"); + + b.Property("TokenEncryptedResponseEnc") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "token_encrypted_response_enc"); + + b.Property("TokenEndPointAuthMethod") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "token_endpoint_auth_method"); + + b.Property("TokenExchangeType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "token_exchange_type"); + + b.Property("TokenExpirationTimeInSeconds") + .HasColumnType("BINARY_DOUBLE") + .HasAnnotation("Relational:JsonPropertyName", "token_expiration_time_seconds"); + + b.Property("TokenSignedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "token_signed_response_alg"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.Property("UserInfoEncryptedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "userinfo_encrypted_response_alg"); + + b.Property("UserInfoEncryptedResponseEnc") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "userinfo_encrypted_response_enc"); + + b.Property("UserInfoSignedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "userinfo_signed_response_alg"); + + b.HasKey("Id"); + + b.HasIndex("AuthenticationContextClassReferenceId"); + + b.ToTable("Clients"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ClientCertificate", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateAuthorityId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("EndDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "end_datetime"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("PrivateKey") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "private_key"); + + b.Property("PublicKey") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "public_key"); + + b.Property("StartDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "start_datetime"); + + b.HasKey("Id"); + + b.HasIndex("CertificateAuthorityId"); + + b.ToTable("ClientCertificate"); + + b.HasAnnotation("Relational:JsonPropertyName", "client_certificates"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ClientJsonWebKey", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Alg") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "alg"); + + b.Property("ClientId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("KeyType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "key_type"); + + b.Property("Kid") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "kid"); + + b.Property("SerializedJsonWebKey") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "serialized_jwk"); + + b.Property("Usage") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "usage"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientJsonWebKey"); + + b.HasAnnotation("Relational:JsonPropertyName", "serialized_jwks"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinition", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("FullQualifiedName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.ToTable("Definitions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ConfigurationDefinitionId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("DisplayCondition") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("IsRequired") + .HasColumnType("BOOLEAN"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Order") + .HasColumnType("NUMBER(10)"); + + b.Property("Type") + .HasColumnType("NUMBER(10)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigurationDefinitionId"); + + b.ToTable("ConfigurationDefinitionRecord"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecordValue", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ConfigurationDefinitionRecordId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigurationDefinitionRecordId"); + + b.ToTable("ConfigurationDefinitionRecordValue"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationKeyPairValueRecord", b => + { + b.Property("Name") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Name"); + + b.ToTable("ConfigurationKeyPairValueRecords"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Consent", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Claims") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "claims"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "client_id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ScopeId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("SerializedAuthorizationDetails") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Status") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "status"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("ScopeId"); + + b.HasIndex("UserId"); + + b.ToTable("Grants"); + + b.HasAnnotation("Relational:JsonPropertyName", "consents"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.DeviceAuthCode", b => + { + b.Property("DeviceCode") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("ExpirationDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("LastAccessTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("NextAccessDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Status") + .HasColumnType("NUMBER(10)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UserId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("UserLogin") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("DeviceCode"); + + b.HasIndex("ClientId"); + + b.HasIndex("UserId"); + + b.ToTable("DeviceAuthCodes"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ExtractedRepresentation", b => + { + b.Property("ExternalId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Version") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("ExternalId"); + + b.ToTable("ExtractedRepresentations"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ExtractedRepresentationStaging", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("GroupIds") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("IdProvisioningProcessId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("RepresentationId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("RepresentationVersion") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Type") + .HasColumnType("NUMBER(10)"); + + b.Property("Values") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.ToTable("ExtractedRepresentationsStaging"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.GotifySession", b => + { + b.Property("ApplicationToken") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ClientToken") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("ApplicationToken"); + + b.ToTable("GotifySessions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Group", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("FullPath") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "full_path"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("ParentGroupId") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "parent_group_id"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Id"); + + b.HasIndex("ParentGroupId"); + + b.ToTable("Groups"); + + b.HasAnnotation("Relational:JsonPropertyName", "group"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.GroupRealm", b => + { + b.Property("GroupsId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("GroupsId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("GroupRealm"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.GroupUser", b => + { + b.Property("GroupsId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("UsersId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("GroupsId", "UsersId"); + + b.HasIndex("UsersId"); + + b.ToTable("GroupUser"); + + b.HasAnnotation("Relational:JsonPropertyName", "groups"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioning", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("DefinitionName") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("IsEnabled") + .HasColumnType("BOOLEAN"); + + b.Property("Name") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.HasIndex("DefinitionName"); + + b.ToTable("IdentityProvisioningLst"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningDefinition", b => + { + b.Property("Name") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("OptionsFullQualifiedName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("OptionsName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Name"); + + b.ToTable("IdentityProvisioningDefinitions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CurrentPage") + .HasColumnType("NUMBER(10)"); + + b.Property("ExecutionDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("IdentityProvisioningId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("NbFilteredRepresentations") + .HasColumnType("NUMBER(10)"); + + b.Property("NbGroups") + .HasColumnType("NUMBER(10)"); + + b.Property("NbUsers") + .HasColumnType("NUMBER(10)"); + + b.Property("ProcessId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Status") + .HasColumnType("NUMBER(10)"); + + b.Property("TotalPages") + .HasColumnType("NUMBER(10)"); + + b.HasKey("Id"); + + b.HasIndex("IdentityProvisioningId"); + + b.ToTable("IdentityProvisioningHistory"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningMappingRule", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("From") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("HasMultipleAttribute") + .HasColumnType("BOOLEAN"); + + b.Property("IdentityProvisioningDefinitionName") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("MapperType") + .HasColumnType("NUMBER(10)"); + + b.Property("TargetUserAttribute") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("TargetUserProperty") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Usage") + .HasColumnType("NUMBER(10)"); + + b.HasKey("Id"); + + b.HasIndex("IdentityProvisioningDefinitionName"); + + b.ToTable("IdentityProvisioningMappingRule"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Language", b => + { + b.Property("Code") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "code"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Code"); + + b.ToTable("Languages"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.MessageBusErrorMessage", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Content") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Exceptions") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ExternalId") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("FullName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("QueueName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ReceivedDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.ToTable("MessageBusErrorMessages"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinition", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Name") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("PublicId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Purpose") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "purpose"); + + b.Property("RealmName") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("RealmName"); + + b.ToTable("PresentationDefinitions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionFormat", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Format") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PresentationDefinitionInputDescriptorId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ProofType") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("PresentationDefinitionInputDescriptorId"); + + b.ToTable("PresentationDefinitionFormat"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptor", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Name") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("PresentationDefinitionId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("PublicId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Purpose") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "purpose"); + + b.HasKey("Id"); + + b.HasIndex("PresentationDefinitionId"); + + b.ToTable("PresentationDefinitionInputDescriptor"); + + b.HasAnnotation("Relational:JsonPropertyName", "input_descriptors"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptorConstraint", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Filter") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Path") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PresentationDefinitionInputDescriptorId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("PresentationDefinitionInputDescriptorId"); + + b.ToTable("PresentationDefinitionInputDescriptorConstraint"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Realm", b => + { + b.Property("Name") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Name"); + + b.ToTable("Realms"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.RealmUser", b => + { + b.Property("UsersId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("UsersId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("RealmUser"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.RegistrationWorkflow", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("IsDefault") + .HasColumnType("BOOLEAN"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("RealmName") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Steps") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.HasIndex("RealmName"); + + b.ToTable("RegistrationWorkflows"); + + b.HasAnnotation("Relational:JsonPropertyName", "registration_workflow"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Scope", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("IsExposedInConfigurationEdp") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_exposed"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("Protocol") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "protocol"); + + b.Property("Type") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "type"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Id"); + + b.ToTable("Scopes"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ScopeClaimMapper", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("IncludeInAccessToken") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "include_in_accesstoken"); + + b.Property("IsMultiValued") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_multivalued"); + + b.Property("MapperType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "mapper_type"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("SAMLAttributeName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "saml_attribute_name"); + + b.Property("ScopeId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("SourceUserAttribute") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "source_user_attribute"); + + b.Property("SourceUserProperty") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "source_user_property"); + + b.Property("TargetClaimPath") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "target_claim_path"); + + b.Property("TokenClaimJsonType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "token_claim_json_type"); + + b.HasKey("Id"); + + b.HasIndex("ScopeId"); + + b.ToTable("ScopeClaimMapper"); + + b.HasAnnotation("Relational:JsonPropertyName", "mappers"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.SerializedFileKey", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Alg") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Enc") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("IsSymmetric") + .HasColumnType("BOOLEAN"); + + b.Property("Key") + .HasColumnType("RAW(2000)"); + + b.Property("KeyId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PrivateKeyPem") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PublicKeyPem") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Usage") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.ToTable("SerializedFileKeys"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Token", b => + { + b.Property("PkID") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("PkID")); + + b.Property("AccessTokenType") + .HasColumnType("NUMBER(10)"); + + b.Property("AuthorizationCode") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Data") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ExpirationTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("GrantId") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Id") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Jkt") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("OriginalData") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("SessionId") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("TokenType") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("PkID"); + + b.ToTable("Tokens"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Translation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClientId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Key") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Language") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Value") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("Translations"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPendingRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Owner") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Requester") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ResourceId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Status") + .HasColumnType("NUMBER(10)"); + + b.Property("TicketId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("ResourceId"); + + b.ToTable("UmaPendingRequest"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPermissionTicket", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.ToTable("UMAPermissionTicket"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPermissionTicketRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ResourceId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UMAPermissionTicketId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("UMAPermissionTicketId"); + + b.ToTable("UMAPermissionTicketRecord"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResource", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "_id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("IconUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "icon_uri"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "resource_scopes"); + + b.Property("Subject") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Type") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "type"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.ToTable("UmaResources"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResourcePermission", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "scopes"); + + b.Property("UMAResourceId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("UMAResourceId"); + + b.ToTable("UMAResourcePermission"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResourcePermissionClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "claim_type"); + + b.Property("FriendlyName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "friendly_name"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("UMAResourcePermissionId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "value"); + + b.HasKey("Id"); + + b.HasIndex("UMAResourcePermissionId"); + + b.ToTable("UMAResourcePermissionClaim"); + + b.HasAnnotation("Relational:JsonPropertyName", "claims"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.User", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "createDateTime"); + + b.Property("DeviceRegistrationToken") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "device_registration_token"); + + b.Property("Email") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "email"); + + b.Property("EmailVerified") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "emailVerified"); + + b.Property("EncodedPicture") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Firstname") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "firstname"); + + b.Property("IdentityProvisioningId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Lastname") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "lastname"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("NbLoginAttempt") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "nb_login_attempt"); + + b.Property("NotificationMode") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "notification_mode"); + + b.Property("Source") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "source"); + + b.Property("Status") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "status"); + + b.Property("UnblockDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "unblock_datetime"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "updateDateTime"); + + b.HasKey("Id"); + + b.HasIndex("IdentityProvisioningId"); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserClaim", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("Type") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "type"); + + b.Property("UserId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "value"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserClaims"); + + b.HasAnnotation("Relational:JsonPropertyName", "claims"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserCredential", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CredentialType") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "type"); + + b.Property("HOTPWindow") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "hotp_window"); + + b.Property("IsActive") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "active"); + + b.Property("OTPAlg") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "otp_alg"); + + b.Property("OTPCounter") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "otp_counter"); + + b.Property("TOTPStep") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "totp_step"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "value"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserCredential"); + + b.HasAnnotation("Relational:JsonPropertyName", "credentials"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserDevice", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("DeviceType") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Manufacturer") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Model") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Name") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PushToken") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PushType") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Version") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserDevice"); + + b.HasAnnotation("Relational:JsonPropertyName", "devices"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserExternalAuthProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Scheme") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "scheme"); + + b.Property("Subject") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "sub"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserExternalAuthProvider"); + + b.HasAnnotation("Relational:JsonPropertyName", "external_auth_providers"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserSession", b => + { + b.Property("SessionId") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "session_id"); + + b.Property("AuthenticationDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "auth_datetime"); + + b.Property("ExpirationDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "exp_datetime"); + + b.Property("IsClientsNotified") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_clients_notified"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "realm"); + + b.Property("SerializedClientIds") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("State") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "state"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("SessionId"); + + b.HasIndex("UserId"); + + b.ToTable("UserSession"); + + b.HasAnnotation("Relational:JsonPropertyName", "sessions"); + }); + + modelBuilder.Entity("TranslationUMAResource", b => + { + b.Property("TranslationsId") + .HasColumnType("NUMBER(10)"); + + b.Property("UMAResourceId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("TranslationsId", "UMAResourceId"); + + b.HasIndex("UMAResourceId"); + + b.ToTable("TranslationUMAResource"); + }); + + modelBuilder.Entity("ApiResourceRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ApiResource", null) + .WithMany() + .HasForeignKey("ApiResourcesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ApiResourceScope", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ApiResource", null) + .WithMany() + .HasForeignKey("ApiResourcesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", null) + .WithMany() + .HasForeignKey("ScopesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("AuthenticationContextClassReferenceRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthenticationContextClassReference", null) + .WithMany() + .HasForeignKey("AuthenticationContextClassReferencesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("AuthenticationSchemeProviderRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProvider", null) + .WithMany() + .HasForeignKey("AuthenticationSchemeProvidersId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("CertificateAuthorityRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.CertificateAuthority", null) + .WithMany() + .HasForeignKey("CertificateAuthoritiesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ClientRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Client", null) + .WithMany() + .HasForeignKey("ClientsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ClientScope", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Client", null) + .WithMany() + .HasForeignKey("ClientsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", null) + .WithMany() + .HasForeignKey("ScopesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ConfigurationDefinitionRecordTranslation", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecord", null) + .WithMany() + .HasForeignKey("ConfigurationDefinitionRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Translation", null) + .WithMany() + .HasForeignKey("TranslationsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ConfigurationDefinitionRecordValueTranslation", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecordValue", null) + .WithMany() + .HasForeignKey("ConfigurationDefinitionRecordValueId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Translation", null) + .WithMany() + .HasForeignKey("TranslationsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("GroupScope", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Group", null) + .WithMany() + .HasForeignKey("GroupsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", null) + .WithMany() + .HasForeignKey("RolesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("IdentityProvisioningRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.IdentityProvisioning", null) + .WithMany() + .HasForeignKey("IdentityProvisioningLstId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("RealmScope", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", null) + .WithMany() + .HasForeignKey("ScopesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("RealmSerializedFileKey", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.SerializedFileKey", null) + .WithMany() + .HasForeignKey("SerializedFileKeysId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationContextClassReference", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.RegistrationWorkflow", "RegistrationWorkflow") + .WithMany("Acrs") + .HasForeignKey("RegistrationWorkflowId"); + + b.Navigation("RegistrationWorkflow"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProvider", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProviderDefinition", "AuthSchemeProviderDefinition") + .WithMany("AuthSchemeProviders") + .HasForeignKey("AuthSchemeProviderDefinitionName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuthSchemeProviderDefinition"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProviderMapper", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProvider", "IdProvider") + .WithMany("Mappers") + .HasForeignKey("IdProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("IdProvider"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthorizedResource", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthorizedScope", null) + .WithMany("AuthorizedResources") + .HasForeignKey("AuthorizedScopeId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthorizedScope", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Consent", "Consent") + .WithMany("Scopes") + .HasForeignKey("ConsentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Consent"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.BCAuthorizeHistory", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.BCAuthorize", null) + .WithMany("Histories") + .HasForeignKey("BCAuthorizeId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Client", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthenticationContextClassReference", null) + .WithMany("Clients") + .HasForeignKey("AuthenticationContextClassReferenceId"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ClientCertificate", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.CertificateAuthority", "CertificateAuthority") + .WithMany("ClientCertificates") + .HasForeignKey("CertificateAuthorityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CertificateAuthority"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ClientJsonWebKey", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Client", null) + .WithMany("SerializedJsonWebKeys") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecord", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ConfigurationDefinition", null) + .WithMany("Records") + .HasForeignKey("ConfigurationDefinitionId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecordValue", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecord", null) + .WithMany("Values") + .HasForeignKey("ConfigurationDefinitionRecordId"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Consent", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", null) + .WithMany("Consents") + .HasForeignKey("ScopeId"); + + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Consents") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.DeviceAuthCode", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Client", "Client") + .WithMany("DeviceAuthCodes") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany() + .HasForeignKey("UserId"); + + b.Navigation("Client"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Group", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Group", "ParentGroup") + .WithMany("Children") + .HasForeignKey("ParentGroupId"); + + b.Navigation("ParentGroup"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.GroupRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Group", "Group") + .WithMany("Realms") + .HasForeignKey("GroupsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", "Realm") + .WithMany("Groups") + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("Realm"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.GroupUser", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Group", "Group") + .WithMany("Users") + .HasForeignKey("GroupsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Groups") + .HasForeignKey("UsersId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioning", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.IdentityProvisioningDefinition", "Definition") + .WithMany("Instances") + .HasForeignKey("DefinitionName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Definition"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningHistory", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.IdentityProvisioning", "IdentityProvisioning") + .WithMany("Histories") + .HasForeignKey("IdentityProvisioningId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("IdentityProvisioning"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningMappingRule", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.IdentityProvisioningDefinition", "IdentityProvisioningDefinition") + .WithMany("MappingRules") + .HasForeignKey("IdentityProvisioningDefinitionName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("IdentityProvisioningDefinition"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinition", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", "Realm") + .WithMany("PresentationDefinitions") + .HasForeignKey("RealmName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Realm"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionFormat", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptor", null) + .WithMany("Format") + .HasForeignKey("PresentationDefinitionInputDescriptorId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptor", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.PresentationDefinition", null) + .WithMany("InputDescriptors") + .HasForeignKey("PresentationDefinitionId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptorConstraint", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptor", null) + .WithMany("Constraints") + .HasForeignKey("PresentationDefinitionInputDescriptorId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.RealmUser", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", "Realm") + .WithMany("Users") + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Realms") + .HasForeignKey("UsersId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Realm"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.RegistrationWorkflow", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", "Realm") + .WithMany("RegistrationWorkflows") + .HasForeignKey("RealmName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Realm"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ScopeClaimMapper", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", "Scope") + .WithMany("ClaimMappers") + .HasForeignKey("ScopeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Scope"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Translation", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Client", null) + .WithMany("Translations") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPendingRequest", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.UMAResource", "Resource") + .WithMany() + .HasForeignKey("ResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resource"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPermissionTicketRecord", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.UMAPermissionTicket", null) + .WithMany("Records") + .HasForeignKey("UMAPermissionTicketId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResourcePermission", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.UMAResource", null) + .WithMany("Permissions") + .HasForeignKey("UMAResourceId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResourcePermissionClaim", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.UMAResourcePermission", null) + .WithMany("Claims") + .HasForeignKey("UMAResourcePermissionId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.User", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.IdentityProvisioning", "IdentityProvisioning") + .WithMany("Users") + .HasForeignKey("IdentityProvisioningId"); + + b.Navigation("IdentityProvisioning"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserClaim", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("OAuthUserClaims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserCredential", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Credentials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserDevice", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Devices") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserExternalAuthProvider", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("ExternalAuthProviders") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserSession", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Sessions") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("TranslationUMAResource", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Translation", null) + .WithMany() + .HasForeignKey("TranslationsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.UMAResource", null) + .WithMany() + .HasForeignKey("UMAResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationContextClassReference", b => + { + b.Navigation("Clients"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProvider", b => + { + b.Navigation("Mappers"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProviderDefinition", b => + { + b.Navigation("AuthSchemeProviders"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthorizedScope", b => + { + b.Navigation("AuthorizedResources"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.BCAuthorize", b => + { + b.Navigation("Histories"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.CertificateAuthority", b => + { + b.Navigation("ClientCertificates"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Client", b => + { + b.Navigation("DeviceAuthCodes"); + + b.Navigation("SerializedJsonWebKeys"); + + b.Navigation("Translations"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinition", b => + { + b.Navigation("Records"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecord", b => + { + b.Navigation("Values"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Consent", b => + { + b.Navigation("Scopes"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Group", b => + { + b.Navigation("Children"); + + b.Navigation("Realms"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioning", b => + { + b.Navigation("Histories"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningDefinition", b => + { + b.Navigation("Instances"); + + b.Navigation("MappingRules"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinition", b => + { + b.Navigation("InputDescriptors"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptor", b => + { + b.Navigation("Constraints"); + + b.Navigation("Format"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Realm", b => + { + b.Navigation("Groups"); + + b.Navigation("PresentationDefinitions"); + + b.Navigation("RegistrationWorkflows"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.RegistrationWorkflow", b => + { + b.Navigation("Acrs"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Scope", b => + { + b.Navigation("ClaimMappers"); + + b.Navigation("Consents"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPermissionTicket", b => + { + b.Navigation("Records"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResource", b => + { + b.Navigation("Permissions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResourcePermission", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.User", b => + { + b.Navigation("Consents"); + + b.Navigation("Credentials"); + + b.Navigation("Devices"); + + b.Navigation("ExternalAuthProviders"); + + b.Navigation("Groups"); + + b.Navigation("OAuthUserClaims"); + + b.Navigation("Realms"); + + b.Navigation("Sessions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/20240620191230_Init.cs b/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/20240620191230_Init.cs new file mode 100644 index 000000000..cec54a7a9 --- /dev/null +++ b/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/20240620191230_Init.cs @@ -0,0 +1,2126 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace SimpleIdServer.IdServer.OracleMigrations.Migrations +{ + /// + public partial class Init : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "ApiResources", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Audience = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Description = table.Column(type: "NVARCHAR2(2000)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ApiResources", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AuditEvents", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + EventName = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Realm = table.Column(type: "NVARCHAR2(2000)", nullable: false), + IsError = table.Column(type: "BOOLEAN", nullable: false), + Description = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ErrorMessage = table.Column(type: "NVARCHAR2(2000)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + ClientId = table.Column(type: "NVARCHAR2(2000)", nullable: true), + UserName = table.Column(type: "NVARCHAR2(2000)", nullable: true), + RequestJSON = table.Column(type: "NVARCHAR2(2000)", nullable: true), + RedirectUrl = table.Column(type: "NVARCHAR2(2000)", nullable: true), + AuthMethod = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Scopes = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Claims = table.Column(type: "NVARCHAR2(2000)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AuditEvents", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AuthenticationSchemeProviderDefinitions", + columns: table => new + { + Name = table.Column(type: "NVARCHAR2(450)", nullable: false), + Description = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Image = table.Column(type: "NVARCHAR2(2000)", nullable: true), + HandlerFullQualifiedName = table.Column(type: "NVARCHAR2(2000)", nullable: true), + OptionsFullQualifiedName = table.Column(type: "NVARCHAR2(2000)", nullable: true), + OptionsName = table.Column(type: "NVARCHAR2(2000)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AuthenticationSchemeProviderDefinitions", x => x.Name); + }); + + migrationBuilder.CreateTable( + name: "BCAuthorizeLst", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + ClientId = table.Column(type: "NVARCHAR2(2000)", nullable: true), + UserId = table.Column(type: "NVARCHAR2(2000)", nullable: true), + NotificationToken = table.Column(type: "NVARCHAR2(2000)", nullable: true), + NotificationMode = table.Column(type: "NVARCHAR2(2000)", nullable: true), + NotificationEdp = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Interval = table.Column(type: "NUMBER(10)", nullable: true), + LastStatus = table.Column(type: "NUMBER(10)", nullable: false), + ExpirationDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + RejectionSentDateTime = table.Column(type: "TIMESTAMP(7)", nullable: true), + NextFetchTime = table.Column(type: "TIMESTAMP(7)", nullable: true), + Realm = table.Column(type: "NVARCHAR2(2000)", nullable: false), + SerializedAuthorizationDetails = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Scopes = table.Column(type: "NVARCHAR2(2000)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BCAuthorizeLst", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CertificateAuthorities", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + SubjectName = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Source = table.Column(type: "NUMBER(10)", nullable: false), + StoreLocation = table.Column(type: "NUMBER(10)", nullable: true), + StoreName = table.Column(type: "NUMBER(10)", nullable: true), + FindType = table.Column(type: "NUMBER(10)", nullable: true), + FindValue = table.Column(type: "NVARCHAR2(2000)", nullable: true), + PublicKey = table.Column(type: "NVARCHAR2(2000)", nullable: true), + PrivateKey = table.Column(type: "NVARCHAR2(2000)", nullable: true), + StartDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + EndDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CertificateAuthorities", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ClaimProviders", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + ProviderType = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ConnectionString = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ClaimType = table.Column(type: "NUMBER(10)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ClaimProviders", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ConfigurationKeyPairValueRecords", + columns: table => new + { + Name = table.Column(type: "NVARCHAR2(450)", nullable: false), + Value = table.Column(type: "NVARCHAR2(2000)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ConfigurationKeyPairValueRecords", x => x.Name); + }); + + migrationBuilder.CreateTable( + name: "DataProtectionKeys", + columns: table => new + { + Id = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + FriendlyName = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Xml = table.Column(type: "NVARCHAR2(2000)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DataProtectionKeys", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Definitions", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + FullQualifiedName = table.Column(type: "NVARCHAR2(2000)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Definitions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ExtractedRepresentations", + columns: table => new + { + ExternalId = table.Column(type: "NVARCHAR2(450)", nullable: false), + Version = table.Column(type: "NVARCHAR2(2000)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ExtractedRepresentations", x => x.ExternalId); + }); + + migrationBuilder.CreateTable( + name: "ExtractedRepresentationsStaging", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + RepresentationId = table.Column(type: "NVARCHAR2(2000)", nullable: false), + RepresentationVersion = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Values = table.Column(type: "NVARCHAR2(2000)", nullable: true), + IdProvisioningProcessId = table.Column(type: "NVARCHAR2(2000)", nullable: false), + GroupIds = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Type = table.Column(type: "NUMBER(10)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ExtractedRepresentationsStaging", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "GotifySessions", + columns: table => new + { + ApplicationToken = table.Column(type: "NVARCHAR2(450)", nullable: false), + ClientToken = table.Column(type: "NVARCHAR2(2000)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_GotifySessions", x => x.ApplicationToken); + }); + + migrationBuilder.CreateTable( + name: "Groups", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + FullPath = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Description = table.Column(type: "NVARCHAR2(2000)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + ParentGroupId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Groups", x => x.Id); + table.ForeignKey( + name: "FK_Groups_Groups_ParentGroupId", + column: x => x.ParentGroupId, + principalTable: "Groups", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "IdentityProvisioningDefinitions", + columns: table => new + { + Name = table.Column(type: "NVARCHAR2(450)", nullable: false), + Description = table.Column(type: "NVARCHAR2(2000)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + OptionsName = table.Column(type: "NVARCHAR2(2000)", nullable: false), + OptionsFullQualifiedName = table.Column(type: "NVARCHAR2(2000)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityProvisioningDefinitions", x => x.Name); + }); + + migrationBuilder.CreateTable( + name: "Languages", + columns: table => new + { + Code = table.Column(type: "NVARCHAR2(450)", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Languages", x => x.Code); + }); + + migrationBuilder.CreateTable( + name: "MessageBusErrorMessages", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + ExternalId = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + FullName = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Content = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Exceptions = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ReceivedDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + QueueName = table.Column(type: "NVARCHAR2(2000)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_MessageBusErrorMessages", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Realms", + columns: table => new + { + Name = table.Column(type: "NVARCHAR2(450)", nullable: false), + Description = table.Column(type: "NVARCHAR2(2000)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Realms", x => x.Name); + }); + + migrationBuilder.CreateTable( + name: "Scopes", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Type = table.Column(type: "NUMBER(10)", nullable: false), + Protocol = table.Column(type: "NUMBER(10)", nullable: false), + Description = table.Column(type: "NVARCHAR2(2000)", nullable: true), + IsExposedInConfigurationEdp = table.Column(type: "BOOLEAN", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Scopes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "SerializedFileKeys", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + KeyId = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Usage = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Alg = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Enc = table.Column(type: "NVARCHAR2(2000)", nullable: true), + PublicKeyPem = table.Column(type: "NVARCHAR2(2000)", nullable: true), + PrivateKeyPem = table.Column(type: "NVARCHAR2(2000)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + IsSymmetric = table.Column(type: "BOOLEAN", nullable: false), + Key = table.Column(type: "RAW(2000)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_SerializedFileKeys", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Tokens", + columns: table => new + { + PkID = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + Id = table.Column(type: "NVARCHAR2(2000)", nullable: true), + SessionId = table.Column(type: "NVARCHAR2(2000)", nullable: true), + ClientId = table.Column(type: "NVARCHAR2(2000)", nullable: false), + TokenType = table.Column(type: "NVARCHAR2(2000)", nullable: false), + AccessTokenType = table.Column(type: "NUMBER(10)", nullable: true), + Data = table.Column(type: "NVARCHAR2(2000)", nullable: true), + OriginalData = table.Column(type: "NVARCHAR2(2000)", nullable: true), + AuthorizationCode = table.Column(type: "NVARCHAR2(2000)", nullable: true), + GrantId = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Jkt = table.Column(type: "NVARCHAR2(2000)", nullable: true), + ExpirationTime = table.Column(type: "TIMESTAMP(7)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Tokens", x => x.PkID); + }); + + migrationBuilder.CreateTable( + name: "UMAPermissionTicket", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UMAPermissionTicket", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "UmaResources", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + IconUri = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Type = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Subject = table.Column(type: "NVARCHAR2(2000)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + Scopes = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Realm = table.Column(type: "NVARCHAR2(2000)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UmaResources", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AuthenticationSchemeProviders", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + DisplayName = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Description = table.Column(type: "NVARCHAR2(2000)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + AuthSchemeProviderDefinitionName = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AuthenticationSchemeProviders", x => x.Id); + table.ForeignKey( + name: "FK_AuthenticationSchemeProviders_AuthenticationSchemeProviderDefinitions_AuthSchemeProviderDefinitionName", + column: x => x.AuthSchemeProviderDefinitionName, + principalTable: "AuthenticationSchemeProviderDefinitions", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "BCAuthorizeHistory", + columns: table => new + { + Id = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + StartDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + EndDateTime = table.Column(type: "TIMESTAMP(7)", nullable: true), + Message = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Status = table.Column(type: "NUMBER(10)", nullable: false), + BCAuthorizeId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_BCAuthorizeHistory", x => x.Id); + table.ForeignKey( + name: "FK_BCAuthorizeHistory_BCAuthorizeLst_BCAuthorizeId", + column: x => x.BCAuthorizeId, + principalTable: "BCAuthorizeLst", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ClientCertificate", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + StartDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + EndDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + PublicKey = table.Column(type: "NVARCHAR2(2000)", nullable: false), + PrivateKey = table.Column(type: "NVARCHAR2(2000)", nullable: false), + CertificateAuthorityId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ClientCertificate", x => x.Id); + table.ForeignKey( + name: "FK_ClientCertificate_CertificateAuthorities_CertificateAuthorityId", + column: x => x.CertificateAuthorityId, + principalTable: "CertificateAuthorities", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ConfigurationDefinitionRecord", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + IsRequired = table.Column(type: "BOOLEAN", nullable: false), + Type = table.Column(type: "NUMBER(10)", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + Order = table.Column(type: "NUMBER(10)", nullable: false), + DisplayCondition = table.Column(type: "NVARCHAR2(2000)", nullable: true), + ConfigurationDefinitionId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ConfigurationDefinitionRecord", x => x.Id); + table.ForeignKey( + name: "FK_ConfigurationDefinitionRecord_Definitions_ConfigurationDefinitionId", + column: x => x.ConfigurationDefinitionId, + principalTable: "Definitions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityProvisioningLst", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Description = table.Column(type: "NVARCHAR2(2000)", nullable: true), + IsEnabled = table.Column(type: "BOOLEAN", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + DefinitionName = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityProvisioningLst", x => x.Id); + table.ForeignKey( + name: "FK_IdentityProvisioningLst_IdentityProvisioningDefinitions_DefinitionName", + column: x => x.DefinitionName, + principalTable: "IdentityProvisioningDefinitions", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityProvisioningMappingRule", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + From = table.Column(type: "NVARCHAR2(2000)", nullable: false), + MapperType = table.Column(type: "NUMBER(10)", nullable: false), + TargetUserAttribute = table.Column(type: "NVARCHAR2(2000)", nullable: true), + TargetUserProperty = table.Column(type: "NVARCHAR2(2000)", nullable: true), + HasMultipleAttribute = table.Column(type: "BOOLEAN", nullable: false), + Usage = table.Column(type: "NUMBER(10)", nullable: false), + IdentityProvisioningDefinitionName = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityProvisioningMappingRule", x => x.Id); + table.ForeignKey( + name: "FK_IdentityProvisioningMappingRule_IdentityProvisioningDefinitions_IdentityProvisioningDefinitionName", + column: x => x.IdentityProvisioningDefinitionName, + principalTable: "IdentityProvisioningDefinitions", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ApiResourceRealm", + columns: table => new + { + ApiResourcesId = table.Column(type: "NVARCHAR2(450)", nullable: false), + RealmsName = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ApiResourceRealm", x => new { x.ApiResourcesId, x.RealmsName }); + table.ForeignKey( + name: "FK_ApiResourceRealm_ApiResources_ApiResourcesId", + column: x => x.ApiResourcesId, + principalTable: "ApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_ApiResourceRealm_Realms_RealmsName", + column: x => x.RealmsName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "CertificateAuthorityRealm", + columns: table => new + { + CertificateAuthoritiesId = table.Column(type: "NVARCHAR2(450)", nullable: false), + RealmsName = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CertificateAuthorityRealm", x => new { x.CertificateAuthoritiesId, x.RealmsName }); + table.ForeignKey( + name: "FK_CertificateAuthorityRealm_CertificateAuthorities_CertificateAuthoritiesId", + column: x => x.CertificateAuthoritiesId, + principalTable: "CertificateAuthorities", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_CertificateAuthorityRealm_Realms_RealmsName", + column: x => x.RealmsName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "GroupRealm", + columns: table => new + { + RealmsName = table.Column(type: "NVARCHAR2(450)", nullable: false), + GroupsId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_GroupRealm", x => new { x.GroupsId, x.RealmsName }); + table.ForeignKey( + name: "FK_GroupRealm_Groups_GroupsId", + column: x => x.GroupsId, + principalTable: "Groups", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_GroupRealm_Realms_RealmsName", + column: x => x.RealmsName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "PresentationDefinitions", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + PublicId = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Purpose = table.Column(type: "NVARCHAR2(2000)", nullable: true), + RealmName = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_PresentationDefinitions", x => x.Id); + table.ForeignKey( + name: "FK_PresentationDefinitions_Realms_RealmName", + column: x => x.RealmName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "RegistrationWorkflows", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + RealmName = table.Column(type: "NVARCHAR2(450)", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + Steps = table.Column(type: "NVARCHAR2(2000)", nullable: false), + IsDefault = table.Column(type: "BOOLEAN", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_RegistrationWorkflows", x => x.Id); + table.ForeignKey( + name: "FK_RegistrationWorkflows_Realms_RealmName", + column: x => x.RealmName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ApiResourceScope", + columns: table => new + { + ApiResourcesId = table.Column(type: "NVARCHAR2(450)", nullable: false), + ScopesId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ApiResourceScope", x => new { x.ApiResourcesId, x.ScopesId }); + table.ForeignKey( + name: "FK_ApiResourceScope_ApiResources_ApiResourcesId", + column: x => x.ApiResourcesId, + principalTable: "ApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_ApiResourceScope_Scopes_ScopesId", + column: x => x.ScopesId, + principalTable: "Scopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "GroupScope", + columns: table => new + { + GroupsId = table.Column(type: "NVARCHAR2(450)", nullable: false), + RolesId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_GroupScope", x => new { x.GroupsId, x.RolesId }); + table.ForeignKey( + name: "FK_GroupScope_Groups_GroupsId", + column: x => x.GroupsId, + principalTable: "Groups", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_GroupScope_Scopes_RolesId", + column: x => x.RolesId, + principalTable: "Scopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "RealmScope", + columns: table => new + { + RealmsName = table.Column(type: "NVARCHAR2(450)", nullable: false), + ScopesId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_RealmScope", x => new { x.RealmsName, x.ScopesId }); + table.ForeignKey( + name: "FK_RealmScope_Realms_RealmsName", + column: x => x.RealmsName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_RealmScope_Scopes_ScopesId", + column: x => x.ScopesId, + principalTable: "Scopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ScopeClaimMapper", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + MapperType = table.Column(type: "NUMBER(10)", nullable: false), + SourceUserAttribute = table.Column(type: "NVARCHAR2(2000)", nullable: true), + SourceUserProperty = table.Column(type: "NVARCHAR2(2000)", nullable: true), + TargetClaimPath = table.Column(type: "NVARCHAR2(2000)", nullable: true), + IncludeInAccessToken = table.Column(type: "BOOLEAN", nullable: false), + SAMLAttributeName = table.Column(type: "NVARCHAR2(2000)", nullable: true), + TokenClaimJsonType = table.Column(type: "NUMBER(10)", nullable: true), + IsMultiValued = table.Column(type: "BOOLEAN", nullable: false), + ScopeId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ScopeClaimMapper", x => x.Id); + table.ForeignKey( + name: "FK_ScopeClaimMapper_Scopes_ScopeId", + column: x => x.ScopeId, + principalTable: "Scopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "RealmSerializedFileKey", + columns: table => new + { + RealmsName = table.Column(type: "NVARCHAR2(450)", nullable: false), + SerializedFileKeysId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_RealmSerializedFileKey", x => new { x.RealmsName, x.SerializedFileKeysId }); + table.ForeignKey( + name: "FK_RealmSerializedFileKey_Realms_RealmsName", + column: x => x.RealmsName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_RealmSerializedFileKey_SerializedFileKeys_SerializedFileKeysId", + column: x => x.SerializedFileKeysId, + principalTable: "SerializedFileKeys", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UMAPermissionTicketRecord", + columns: table => new + { + Id = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + ResourceId = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Scopes = table.Column(type: "NVARCHAR2(2000)", nullable: false), + UMAPermissionTicketId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_UMAPermissionTicketRecord", x => x.Id); + table.ForeignKey( + name: "FK_UMAPermissionTicketRecord_UMAPermissionTicket_UMAPermissionTicketId", + column: x => x.UMAPermissionTicketId, + principalTable: "UMAPermissionTicket", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UmaPendingRequest", + columns: table => new + { + Id = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + TicketId = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Requester = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Owner = table.Column(type: "NVARCHAR2(2000)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + Status = table.Column(type: "NUMBER(10)", nullable: false), + ResourceId = table.Column(type: "NVARCHAR2(450)", nullable: false), + Realm = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Scopes = table.Column(type: "NVARCHAR2(2000)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UmaPendingRequest", x => x.Id); + table.ForeignKey( + name: "FK_UmaPendingRequest_UmaResources_ResourceId", + column: x => x.ResourceId, + principalTable: "UmaResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UMAResourcePermission", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + Scopes = table.Column(type: "NVARCHAR2(2000)", nullable: false), + UMAResourceId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_UMAResourcePermission", x => x.Id); + table.ForeignKey( + name: "FK_UMAResourcePermission_UmaResources_UMAResourceId", + column: x => x.UMAResourceId, + principalTable: "UmaResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AuthenticationSchemeProviderMapper", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + SourceClaimName = table.Column(type: "NVARCHAR2(2000)", nullable: true), + MapperType = table.Column(type: "NUMBER(10)", nullable: false), + TargetUserAttribute = table.Column(type: "NVARCHAR2(2000)", nullable: true), + TargetUserProperty = table.Column(type: "NVARCHAR2(2000)", nullable: true), + IdProviderId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AuthenticationSchemeProviderMapper", x => x.Id); + table.ForeignKey( + name: "FK_AuthenticationSchemeProviderMapper_AuthenticationSchemeProviders_IdProviderId", + column: x => x.IdProviderId, + principalTable: "AuthenticationSchemeProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AuthenticationSchemeProviderRealm", + columns: table => new + { + AuthenticationSchemeProvidersId = table.Column(type: "NVARCHAR2(450)", nullable: false), + RealmsName = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AuthenticationSchemeProviderRealm", x => new { x.AuthenticationSchemeProvidersId, x.RealmsName }); + table.ForeignKey( + name: "FK_AuthenticationSchemeProviderRealm_AuthenticationSchemeProviders_AuthenticationSchemeProvidersId", + column: x => x.AuthenticationSchemeProvidersId, + principalTable: "AuthenticationSchemeProviders", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AuthenticationSchemeProviderRealm_Realms_RealmsName", + column: x => x.RealmsName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ConfigurationDefinitionRecordValue", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Value = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ConfigurationDefinitionRecordId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ConfigurationDefinitionRecordValue", x => x.Id); + table.ForeignKey( + name: "FK_ConfigurationDefinitionRecordValue_ConfigurationDefinitionRecord_ConfigurationDefinitionRecordId", + column: x => x.ConfigurationDefinitionRecordId, + principalTable: "ConfigurationDefinitionRecord", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "IdentityProvisioningHistory", + columns: table => new + { + Id = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + ProcessId = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ExecutionDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + CurrentPage = table.Column(type: "NUMBER(10)", nullable: false), + NbUsers = table.Column(type: "NUMBER(10)", nullable: false), + NbGroups = table.Column(type: "NUMBER(10)", nullable: false), + NbFilteredRepresentations = table.Column(type: "NUMBER(10)", nullable: false), + TotalPages = table.Column(type: "NUMBER(10)", nullable: false), + Status = table.Column(type: "NUMBER(10)", nullable: false), + IdentityProvisioningId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityProvisioningHistory", x => x.Id); + table.ForeignKey( + name: "FK_IdentityProvisioningHistory_IdentityProvisioningLst_IdentityProvisioningId", + column: x => x.IdentityProvisioningId, + principalTable: "IdentityProvisioningLst", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityProvisioningRealm", + columns: table => new + { + IdentityProvisioningLstId = table.Column(type: "NVARCHAR2(450)", nullable: false), + RealmsName = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityProvisioningRealm", x => new { x.IdentityProvisioningLstId, x.RealmsName }); + table.ForeignKey( + name: "FK_IdentityProvisioningRealm_IdentityProvisioningLst_IdentityProvisioningLstId", + column: x => x.IdentityProvisioningLstId, + principalTable: "IdentityProvisioningLst", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_IdentityProvisioningRealm_Realms_RealmsName", + column: x => x.RealmsName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Users", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Firstname = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Lastname = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Email = table.Column(type: "NVARCHAR2(2000)", nullable: true), + EmailVerified = table.Column(type: "BOOLEAN", nullable: false), + DeviceRegistrationToken = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Status = table.Column(type: "NUMBER(10)", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + Source = table.Column(type: "NVARCHAR2(2000)", nullable: true), + UnblockDateTime = table.Column(type: "TIMESTAMP(7)", nullable: true), + NbLoginAttempt = table.Column(type: "NUMBER(10)", nullable: false), + IdentityProvisioningId = table.Column(type: "NVARCHAR2(450)", nullable: true), + EncodedPicture = table.Column(type: "NVARCHAR2(2000)", nullable: true), + NotificationMode = table.Column(type: "NVARCHAR2(2000)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Users", x => x.Id); + table.ForeignKey( + name: "FK_Users_IdentityProvisioningLst_IdentityProvisioningId", + column: x => x.IdentityProvisioningId, + principalTable: "IdentityProvisioningLst", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "PresentationDefinitionInputDescriptor", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + PublicId = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Purpose = table.Column(type: "NVARCHAR2(2000)", nullable: true), + PresentationDefinitionId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_PresentationDefinitionInputDescriptor", x => x.Id); + table.ForeignKey( + name: "FK_PresentationDefinitionInputDescriptor_PresentationDefinitions_PresentationDefinitionId", + column: x => x.PresentationDefinitionId, + principalTable: "PresentationDefinitions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Acrs", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + DisplayName = table.Column(type: "NVARCHAR2(2000)", nullable: false), + AuthenticationMethodReferences = table.Column(type: "NVARCHAR2(2000)", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + RegistrationWorkflowId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Acrs", x => x.Id); + table.ForeignKey( + name: "FK_Acrs_RegistrationWorkflows_RegistrationWorkflowId", + column: x => x.RegistrationWorkflowId, + principalTable: "RegistrationWorkflows", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "UMAResourcePermissionClaim", + columns: table => new + { + Id = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + ClaimType = table.Column(type: "NVARCHAR2(2000)", nullable: true), + FriendlyName = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Value = table.Column(type: "NVARCHAR2(2000)", nullable: false), + UMAResourcePermissionId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_UMAResourcePermissionClaim", x => x.Id); + table.ForeignKey( + name: "FK_UMAResourcePermissionClaim_UMAResourcePermission_UMAResourcePermissionId", + column: x => x.UMAResourcePermissionId, + principalTable: "UMAResourcePermission", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Grants", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + ClientId = table.Column(type: "NVARCHAR2(2000)", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + Status = table.Column(type: "NUMBER(10)", nullable: false), + Claims = table.Column(type: "NVARCHAR2(2000)", nullable: false), + SerializedAuthorizationDetails = table.Column(type: "NVARCHAR2(2000)", nullable: true), + UserId = table.Column(type: "NVARCHAR2(450)", nullable: false), + Realm = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ScopeId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Grants", x => x.Id); + table.ForeignKey( + name: "FK_Grants_Scopes_ScopeId", + column: x => x.ScopeId, + principalTable: "Scopes", + principalColumn: "Id"); + table.ForeignKey( + name: "FK_Grants_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "GroupUser", + columns: table => new + { + GroupsId = table.Column(type: "NVARCHAR2(450)", nullable: false), + UsersId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_GroupUser", x => new { x.GroupsId, x.UsersId }); + table.ForeignKey( + name: "FK_GroupUser_Groups_GroupsId", + column: x => x.GroupsId, + principalTable: "Groups", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_GroupUser_Users_UsersId", + column: x => x.UsersId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "RealmUser", + columns: table => new + { + RealmsName = table.Column(type: "NVARCHAR2(450)", nullable: false), + UsersId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_RealmUser", x => new { x.UsersId, x.RealmsName }); + table.ForeignKey( + name: "FK_RealmUser_Realms_RealmsName", + column: x => x.RealmsName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_RealmUser_Users_UsersId", + column: x => x.UsersId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserClaims", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Value = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Type = table.Column(type: "NVARCHAR2(2000)", nullable: true), + UserId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_UserClaims", x => x.Id); + table.ForeignKey( + name: "FK_UserClaims_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserCredential", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + CredentialType = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Value = table.Column(type: "NVARCHAR2(2000)", nullable: false), + OTPAlg = table.Column(type: "NUMBER(10)", nullable: true), + IsActive = table.Column(type: "BOOLEAN", nullable: false), + OTPCounter = table.Column(type: "NUMBER(10)", nullable: false), + TOTPStep = table.Column(type: "NUMBER(10)", nullable: false), + HOTPWindow = table.Column(type: "NUMBER(10)", nullable: false), + UserId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserCredential", x => x.Id); + table.ForeignKey( + name: "FK_UserCredential_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserDevice", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + DeviceType = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Model = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Manufacturer = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Name = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Version = table.Column(type: "NVARCHAR2(2000)", nullable: true), + PushToken = table.Column(type: "NVARCHAR2(2000)", nullable: true), + PushType = table.Column(type: "NVARCHAR2(2000)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UserId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserDevice", x => x.Id); + table.ForeignKey( + name: "FK_UserDevice_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserExternalAuthProvider", + columns: table => new + { + Id = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + Scheme = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Subject = table.Column(type: "NVARCHAR2(2000)", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UserId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserExternalAuthProvider", x => x.Id); + table.ForeignKey( + name: "FK_UserExternalAuthProvider_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserSession", + columns: table => new + { + SessionId = table.Column(type: "NVARCHAR2(450)", nullable: false), + AuthenticationDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + ExpirationDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + State = table.Column(type: "NUMBER(10)", nullable: false), + Realm = table.Column(type: "NVARCHAR2(2000)", nullable: false), + IsClientsNotified = table.Column(type: "BOOLEAN", nullable: false), + SerializedClientIds = table.Column(type: "NVARCHAR2(2000)", nullable: false), + UserId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserSession", x => x.SessionId); + table.ForeignKey( + name: "FK_UserSession_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "PresentationDefinitionFormat", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Format = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ProofType = table.Column(type: "NVARCHAR2(2000)", nullable: false), + PresentationDefinitionInputDescriptorId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_PresentationDefinitionFormat", x => x.Id); + table.ForeignKey( + name: "FK_PresentationDefinitionFormat_PresentationDefinitionInputDescriptor_PresentationDefinitionInputDescriptorId", + column: x => x.PresentationDefinitionInputDescriptorId, + principalTable: "PresentationDefinitionInputDescriptor", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "PresentationDefinitionInputDescriptorConstraint", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + Path = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Filter = table.Column(type: "NVARCHAR2(2000)", nullable: false), + PresentationDefinitionInputDescriptorId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_PresentationDefinitionInputDescriptorConstraint", x => x.Id); + table.ForeignKey( + name: "FK_PresentationDefinitionInputDescriptorConstraint_PresentationDefinitionInputDescriptor_PresentationDefinitionInputDescriptorId", + column: x => x.PresentationDefinitionInputDescriptorId, + principalTable: "PresentationDefinitionInputDescriptor", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AuthenticationContextClassReferenceRealm", + columns: table => new + { + AuthenticationContextClassReferencesId = table.Column(type: "NVARCHAR2(450)", nullable: false), + RealmsName = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AuthenticationContextClassReferenceRealm", x => new { x.AuthenticationContextClassReferencesId, x.RealmsName }); + table.ForeignKey( + name: "FK_AuthenticationContextClassReferenceRealm_Acrs_AuthenticationContextClassReferencesId", + column: x => x.AuthenticationContextClassReferencesId, + principalTable: "Acrs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AuthenticationContextClassReferenceRealm_Realms_RealmsName", + column: x => x.RealmsName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Clients", + columns: table => new + { + Id = table.Column(type: "NVARCHAR2(450)", nullable: false), + ClientId = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ClientSecret = table.Column(type: "NVARCHAR2(2000)", nullable: false), + RegistrationAccessToken = table.Column(type: "NVARCHAR2(2000)", nullable: true), + GrantTypes = table.Column(type: "NVARCHAR2(2000)", nullable: false), + RedirectionUrls = table.Column(type: "NVARCHAR2(2000)", nullable: false), + TokenEndPointAuthMethod = table.Column(type: "NVARCHAR2(2000)", nullable: true), + ResponseTypes = table.Column(type: "NVARCHAR2(2000)", nullable: false), + JwksUri = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Contacts = table.Column(type: "NVARCHAR2(2000)", nullable: false), + SoftwareId = table.Column(type: "NVARCHAR2(2000)", nullable: true), + SoftwareVersion = table.Column(type: "NVARCHAR2(2000)", nullable: true), + TlsClientAuthSubjectDN = table.Column(type: "NVARCHAR2(2000)", nullable: true), + TlsClientAuthSanDNS = table.Column(type: "NVARCHAR2(2000)", nullable: true), + TlsClientAuthSanURI = table.Column(type: "NVARCHAR2(2000)", nullable: true), + TlsClientAuthSanIP = table.Column(type: "NVARCHAR2(2000)", nullable: true), + TlsClientAuthSanEmail = table.Column(type: "NVARCHAR2(2000)", nullable: true), + ClientSecretExpirationTime = table.Column(type: "TIMESTAMP(7)", nullable: true), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + IsTokenExchangeEnabled = table.Column(type: "BOOLEAN", nullable: false), + TokenExchangeType = table.Column(type: "NUMBER(10)", nullable: true), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + TokenExpirationTimeInSeconds = table.Column(type: "BINARY_DOUBLE", nullable: true), + CNonceExpirationTimeInSeconds = table.Column(type: "BINARY_DOUBLE", nullable: true), + RefreshTokenExpirationTimeInSeconds = table.Column(type: "BINARY_DOUBLE", nullable: true), + TokenSignedResponseAlg = table.Column(type: "NVARCHAR2(2000)", nullable: true), + TokenEncryptedResponseAlg = table.Column(type: "NVARCHAR2(2000)", nullable: true), + TokenEncryptedResponseEnc = table.Column(type: "NVARCHAR2(2000)", nullable: true), + PostLogoutRedirectUris = table.Column(type: "NVARCHAR2(2000)", nullable: false), + RedirectToRevokeSessionUI = table.Column(type: "BOOLEAN", nullable: false), + PreferredTokenProfile = table.Column(type: "NVARCHAR2(2000)", nullable: true), + RequestObjectSigningAlg = table.Column(type: "NVARCHAR2(2000)", nullable: true), + RequestObjectEncryptionAlg = table.Column(type: "NVARCHAR2(2000)", nullable: true), + RequestObjectEncryptionEnc = table.Column(type: "NVARCHAR2(2000)", nullable: true), + SubjectType = table.Column(type: "NVARCHAR2(2000)", nullable: true), + PairWiseIdentifierSalt = table.Column(type: "NVARCHAR2(2000)", nullable: true), + SectorIdentifierUri = table.Column(type: "NVARCHAR2(2000)", nullable: true), + IdTokenSignedResponseAlg = table.Column(type: "NVARCHAR2(2000)", nullable: true), + IdTokenEncryptedResponseAlg = table.Column(type: "NVARCHAR2(2000)", nullable: true), + IdTokenEncryptedResponseEnc = table.Column(type: "NVARCHAR2(2000)", nullable: true), + BCTokenDeliveryMode = table.Column(type: "NVARCHAR2(2000)", nullable: true), + BCClientNotificationEndpoint = table.Column(type: "NVARCHAR2(2000)", nullable: true), + BCAuthenticationRequestSigningAlg = table.Column(type: "NVARCHAR2(2000)", nullable: true), + UserInfoSignedResponseAlg = table.Column(type: "NVARCHAR2(2000)", nullable: true), + UserInfoEncryptedResponseAlg = table.Column(type: "NVARCHAR2(2000)", nullable: true), + UserInfoEncryptedResponseEnc = table.Column(type: "NVARCHAR2(2000)", nullable: true), + BCUserCodeParameter = table.Column(type: "BOOLEAN", nullable: false), + FrontChannelLogoutUri = table.Column(type: "NVARCHAR2(2000)", nullable: true), + CredentialOfferEndpoint = table.Column(type: "NVARCHAR2(2000)", nullable: true), + IsTransactionCodeRequired = table.Column(type: "BOOLEAN", nullable: false), + PreAuthCodeExpirationTimeInSeconds = table.Column(type: "BINARY_DOUBLE", nullable: false), + FrontChannelLogoutSessionRequired = table.Column(type: "BOOLEAN", nullable: false), + BackChannelLogoutSessionRequired = table.Column(type: "BOOLEAN", nullable: false), + DefaultMaxAge = table.Column(type: "BINARY_DOUBLE", nullable: true), + TlsClientCertificateBoundAccessToken = table.Column(type: "BOOLEAN", nullable: false), + BackChannelLogoutUri = table.Column(type: "NVARCHAR2(2000)", nullable: true), + ApplicationType = table.Column(type: "NVARCHAR2(2000)", nullable: true), + InitiateLoginUri = table.Column(type: "NVARCHAR2(2000)", nullable: true), + RequireAuthTime = table.Column(type: "BOOLEAN", nullable: false), + AuthorizationSignedResponseAlg = table.Column(type: "NVARCHAR2(2000)", nullable: true), + AuthorizationEncryptedResponseAlg = table.Column(type: "NVARCHAR2(2000)", nullable: true), + AuthorizationDataTypes = table.Column(type: "NVARCHAR2(2000)", nullable: false), + AuthorizationEncryptedResponseEnc = table.Column(type: "NVARCHAR2(2000)", nullable: true), + DPOPBoundAccessTokens = table.Column(type: "BOOLEAN", nullable: false), + IsConsentDisabled = table.Column(type: "BOOLEAN", nullable: false), + IsResourceParameterRequired = table.Column(type: "BOOLEAN", nullable: false), + AuthReqIdExpirationTimeInSeconds = table.Column(type: "NUMBER(10)", nullable: false), + ClientType = table.Column(type: "NVARCHAR2(2000)", nullable: true), + IsDPOPNonceRequired = table.Column(type: "BOOLEAN", nullable: false), + DPOPNonceLifetimeInSeconds = table.Column(type: "BINARY_DOUBLE", nullable: false), + IsRedirectUrlCaseSensitive = table.Column(type: "BOOLEAN", nullable: false), + SerializedParameters = table.Column(type: "NVARCHAR2(2000)", nullable: true), + DefaultAcrValues = table.Column(type: "NVARCHAR2(2000)", nullable: false), + BCIntervalSeconds = table.Column(type: "NUMBER(10)", nullable: false), + AccessTokenType = table.Column(type: "NUMBER(10)", nullable: false), + AuthenticationContextClassReferenceId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Clients", x => x.Id); + table.ForeignKey( + name: "FK_Clients_Acrs_AuthenticationContextClassReferenceId", + column: x => x.AuthenticationContextClassReferenceId, + principalTable: "Acrs", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "AuthorizedScope", + columns: table => new + { + Id = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + Scope = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ConsentId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AuthorizedScope", x => x.Id); + table.ForeignKey( + name: "FK_AuthorizedScope_Grants_ConsentId", + column: x => x.ConsentId, + principalTable: "Grants", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ClientJsonWebKey", + columns: table => new + { + Id = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + Kid = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Alg = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Usage = table.Column(type: "NVARCHAR2(2000)", nullable: false), + KeyType = table.Column(type: "NUMBER(10)", nullable: true), + SerializedJsonWebKey = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ClientId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ClientJsonWebKey", x => x.Id); + table.ForeignKey( + name: "FK_ClientJsonWebKey_Clients_ClientId", + column: x => x.ClientId, + principalTable: "Clients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ClientRealm", + columns: table => new + { + ClientsId = table.Column(type: "NVARCHAR2(450)", nullable: false), + RealmsName = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ClientRealm", x => new { x.ClientsId, x.RealmsName }); + table.ForeignKey( + name: "FK_ClientRealm_Clients_ClientsId", + column: x => x.ClientsId, + principalTable: "Clients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_ClientRealm_Realms_RealmsName", + column: x => x.RealmsName, + principalTable: "Realms", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ClientScope", + columns: table => new + { + ClientsId = table.Column(type: "NVARCHAR2(450)", nullable: false), + ScopesId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ClientScope", x => new { x.ClientsId, x.ScopesId }); + table.ForeignKey( + name: "FK_ClientScope_Clients_ClientsId", + column: x => x.ClientsId, + principalTable: "Clients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_ClientScope_Scopes_ScopesId", + column: x => x.ScopesId, + principalTable: "Scopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "DeviceAuthCodes", + columns: table => new + { + DeviceCode = table.Column(type: "NVARCHAR2(450)", nullable: false), + UserCode = table.Column(type: "NVARCHAR2(2000)", nullable: false), + ClientId = table.Column(type: "NVARCHAR2(450)", nullable: false), + UserLogin = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Scopes = table.Column(type: "NVARCHAR2(2000)", nullable: false), + CreateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UpdateDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + ExpirationDateTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + NextAccessDateTime = table.Column(type: "TIMESTAMP(7)", nullable: true), + Status = table.Column(type: "NUMBER(10)", nullable: false), + LastAccessTime = table.Column(type: "TIMESTAMP(7)", nullable: false), + UserId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DeviceAuthCodes", x => x.DeviceCode); + table.ForeignKey( + name: "FK_DeviceAuthCodes_Clients_ClientId", + column: x => x.ClientId, + principalTable: "Clients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_DeviceAuthCodes_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "Translations", + columns: table => new + { + Id = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + Key = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Value = table.Column(type: "NVARCHAR2(2000)", nullable: true), + Language = table.Column(type: "NVARCHAR2(2000)", nullable: true), + ClientId = table.Column(type: "NVARCHAR2(450)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Translations", x => x.Id); + table.ForeignKey( + name: "FK_Translations_Clients_ClientId", + column: x => x.ClientId, + principalTable: "Clients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AuthorizedResource", + columns: table => new + { + Id = table.Column(type: "NUMBER(10)", nullable: false) + .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), + Resource = table.Column(type: "NVARCHAR2(2000)", nullable: false), + Audience = table.Column(type: "NVARCHAR2(2000)", nullable: true), + AuthorizedScopeId = table.Column(type: "NUMBER(10)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AuthorizedResource", x => x.Id); + table.ForeignKey( + name: "FK_AuthorizedResource_AuthorizedScope_AuthorizedScopeId", + column: x => x.AuthorizedScopeId, + principalTable: "AuthorizedScope", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ConfigurationDefinitionRecordTranslation", + columns: table => new + { + ConfigurationDefinitionRecordId = table.Column(type: "NVARCHAR2(450)", nullable: false), + TranslationsId = table.Column(type: "NUMBER(10)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ConfigurationDefinitionRecordTranslation", x => new { x.ConfigurationDefinitionRecordId, x.TranslationsId }); + table.ForeignKey( + name: "FK_ConfigurationDefinitionRecordTranslation_ConfigurationDefinitionRecord_ConfigurationDefinitionRecordId", + column: x => x.ConfigurationDefinitionRecordId, + principalTable: "ConfigurationDefinitionRecord", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_ConfigurationDefinitionRecordTranslation_Translations_TranslationsId", + column: x => x.TranslationsId, + principalTable: "Translations", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ConfigurationDefinitionRecordValueTranslation", + columns: table => new + { + ConfigurationDefinitionRecordValueId = table.Column(type: "NVARCHAR2(450)", nullable: false), + TranslationsId = table.Column(type: "NUMBER(10)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ConfigurationDefinitionRecordValueTranslation", x => new { x.ConfigurationDefinitionRecordValueId, x.TranslationsId }); + table.ForeignKey( + name: "FK_ConfigurationDefinitionRecordValueTranslation_ConfigurationDefinitionRecordValue_ConfigurationDefinitionRecordValueId", + column: x => x.ConfigurationDefinitionRecordValueId, + principalTable: "ConfigurationDefinitionRecordValue", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_ConfigurationDefinitionRecordValueTranslation_Translations_TranslationsId", + column: x => x.TranslationsId, + principalTable: "Translations", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "TranslationUMAResource", + columns: table => new + { + TranslationsId = table.Column(type: "NUMBER(10)", nullable: false), + UMAResourceId = table.Column(type: "NVARCHAR2(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TranslationUMAResource", x => new { x.TranslationsId, x.UMAResourceId }); + table.ForeignKey( + name: "FK_TranslationUMAResource_Translations_TranslationsId", + column: x => x.TranslationsId, + principalTable: "Translations", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_TranslationUMAResource_UmaResources_UMAResourceId", + column: x => x.UMAResourceId, + principalTable: "UmaResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_Acrs_RegistrationWorkflowId", + table: "Acrs", + column: "RegistrationWorkflowId"); + + migrationBuilder.CreateIndex( + name: "IX_ApiResourceRealm_RealmsName", + table: "ApiResourceRealm", + column: "RealmsName"); + + migrationBuilder.CreateIndex( + name: "IX_ApiResourceScope_ScopesId", + table: "ApiResourceScope", + column: "ScopesId"); + + migrationBuilder.CreateIndex( + name: "IX_AuthenticationContextClassReferenceRealm_RealmsName", + table: "AuthenticationContextClassReferenceRealm", + column: "RealmsName"); + + migrationBuilder.CreateIndex( + name: "IX_AuthenticationSchemeProviderMapper_IdProviderId", + table: "AuthenticationSchemeProviderMapper", + column: "IdProviderId"); + + migrationBuilder.CreateIndex( + name: "IX_AuthenticationSchemeProviderRealm_RealmsName", + table: "AuthenticationSchemeProviderRealm", + column: "RealmsName"); + + migrationBuilder.CreateIndex( + name: "IX_AuthenticationSchemeProviders_AuthSchemeProviderDefinitionName", + table: "AuthenticationSchemeProviders", + column: "AuthSchemeProviderDefinitionName"); + + migrationBuilder.CreateIndex( + name: "IX_AuthorizedResource_AuthorizedScopeId", + table: "AuthorizedResource", + column: "AuthorizedScopeId"); + + migrationBuilder.CreateIndex( + name: "IX_AuthorizedScope_ConsentId", + table: "AuthorizedScope", + column: "ConsentId"); + + migrationBuilder.CreateIndex( + name: "IX_BCAuthorizeHistory_BCAuthorizeId", + table: "BCAuthorizeHistory", + column: "BCAuthorizeId"); + + migrationBuilder.CreateIndex( + name: "IX_CertificateAuthorityRealm_RealmsName", + table: "CertificateAuthorityRealm", + column: "RealmsName"); + + migrationBuilder.CreateIndex( + name: "IX_ClientCertificate_CertificateAuthorityId", + table: "ClientCertificate", + column: "CertificateAuthorityId"); + + migrationBuilder.CreateIndex( + name: "IX_ClientJsonWebKey_ClientId", + table: "ClientJsonWebKey", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_ClientRealm_RealmsName", + table: "ClientRealm", + column: "RealmsName"); + + migrationBuilder.CreateIndex( + name: "IX_Clients_AuthenticationContextClassReferenceId", + table: "Clients", + column: "AuthenticationContextClassReferenceId"); + + migrationBuilder.CreateIndex( + name: "IX_ClientScope_ScopesId", + table: "ClientScope", + column: "ScopesId"); + + migrationBuilder.CreateIndex( + name: "IX_ConfigurationDefinitionRecord_ConfigurationDefinitionId", + table: "ConfigurationDefinitionRecord", + column: "ConfigurationDefinitionId"); + + migrationBuilder.CreateIndex( + name: "IX_ConfigurationDefinitionRecordTranslation_TranslationsId", + table: "ConfigurationDefinitionRecordTranslation", + column: "TranslationsId"); + + migrationBuilder.CreateIndex( + name: "IX_ConfigurationDefinitionRecordValue_ConfigurationDefinitionRecordId", + table: "ConfigurationDefinitionRecordValue", + column: "ConfigurationDefinitionRecordId"); + + migrationBuilder.CreateIndex( + name: "IX_ConfigurationDefinitionRecordValueTranslation_TranslationsId", + table: "ConfigurationDefinitionRecordValueTranslation", + column: "TranslationsId"); + + migrationBuilder.CreateIndex( + name: "IX_DeviceAuthCodes_ClientId", + table: "DeviceAuthCodes", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_DeviceAuthCodes_UserId", + table: "DeviceAuthCodes", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_Grants_ScopeId", + table: "Grants", + column: "ScopeId"); + + migrationBuilder.CreateIndex( + name: "IX_Grants_UserId", + table: "Grants", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_GroupRealm_RealmsName", + table: "GroupRealm", + column: "RealmsName"); + + migrationBuilder.CreateIndex( + name: "IX_Groups_ParentGroupId", + table: "Groups", + column: "ParentGroupId"); + + migrationBuilder.CreateIndex( + name: "IX_GroupScope_RolesId", + table: "GroupScope", + column: "RolesId"); + + migrationBuilder.CreateIndex( + name: "IX_GroupUser_UsersId", + table: "GroupUser", + column: "UsersId"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityProvisioningHistory_IdentityProvisioningId", + table: "IdentityProvisioningHistory", + column: "IdentityProvisioningId"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityProvisioningLst_DefinitionName", + table: "IdentityProvisioningLst", + column: "DefinitionName"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityProvisioningMappingRule_IdentityProvisioningDefinitionName", + table: "IdentityProvisioningMappingRule", + column: "IdentityProvisioningDefinitionName"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityProvisioningRealm_RealmsName", + table: "IdentityProvisioningRealm", + column: "RealmsName"); + + migrationBuilder.CreateIndex( + name: "IX_PresentationDefinitionFormat_PresentationDefinitionInputDescriptorId", + table: "PresentationDefinitionFormat", + column: "PresentationDefinitionInputDescriptorId"); + + migrationBuilder.CreateIndex( + name: "IX_PresentationDefinitionInputDescriptor_PresentationDefinitionId", + table: "PresentationDefinitionInputDescriptor", + column: "PresentationDefinitionId"); + + migrationBuilder.CreateIndex( + name: "IX_PresentationDefinitionInputDescriptorConstraint_PresentationDefinitionInputDescriptorId", + table: "PresentationDefinitionInputDescriptorConstraint", + column: "PresentationDefinitionInputDescriptorId"); + + migrationBuilder.CreateIndex( + name: "IX_PresentationDefinitions_RealmName", + table: "PresentationDefinitions", + column: "RealmName"); + + migrationBuilder.CreateIndex( + name: "IX_RealmScope_ScopesId", + table: "RealmScope", + column: "ScopesId"); + + migrationBuilder.CreateIndex( + name: "IX_RealmSerializedFileKey_SerializedFileKeysId", + table: "RealmSerializedFileKey", + column: "SerializedFileKeysId"); + + migrationBuilder.CreateIndex( + name: "IX_RealmUser_RealmsName", + table: "RealmUser", + column: "RealmsName"); + + migrationBuilder.CreateIndex( + name: "IX_RegistrationWorkflows_RealmName", + table: "RegistrationWorkflows", + column: "RealmName"); + + migrationBuilder.CreateIndex( + name: "IX_ScopeClaimMapper_ScopeId", + table: "ScopeClaimMapper", + column: "ScopeId"); + + migrationBuilder.CreateIndex( + name: "IX_Translations_ClientId", + table: "Translations", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_TranslationUMAResource_UMAResourceId", + table: "TranslationUMAResource", + column: "UMAResourceId"); + + migrationBuilder.CreateIndex( + name: "IX_UmaPendingRequest_ResourceId", + table: "UmaPendingRequest", + column: "ResourceId"); + + migrationBuilder.CreateIndex( + name: "IX_UMAPermissionTicketRecord_UMAPermissionTicketId", + table: "UMAPermissionTicketRecord", + column: "UMAPermissionTicketId"); + + migrationBuilder.CreateIndex( + name: "IX_UMAResourcePermission_UMAResourceId", + table: "UMAResourcePermission", + column: "UMAResourceId"); + + migrationBuilder.CreateIndex( + name: "IX_UMAResourcePermissionClaim_UMAResourcePermissionId", + table: "UMAResourcePermissionClaim", + column: "UMAResourcePermissionId"); + + migrationBuilder.CreateIndex( + name: "IX_UserClaims_UserId", + table: "UserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserCredential_UserId", + table: "UserCredential", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserDevice_UserId", + table: "UserDevice", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserExternalAuthProvider_UserId", + table: "UserExternalAuthProvider", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_Users_IdentityProvisioningId", + table: "Users", + column: "IdentityProvisioningId"); + + migrationBuilder.CreateIndex( + name: "IX_UserSession_UserId", + table: "UserSession", + column: "UserId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ApiResourceRealm"); + + migrationBuilder.DropTable( + name: "ApiResourceScope"); + + migrationBuilder.DropTable( + name: "AuditEvents"); + + migrationBuilder.DropTable( + name: "AuthenticationContextClassReferenceRealm"); + + migrationBuilder.DropTable( + name: "AuthenticationSchemeProviderMapper"); + + migrationBuilder.DropTable( + name: "AuthenticationSchemeProviderRealm"); + + migrationBuilder.DropTable( + name: "AuthorizedResource"); + + migrationBuilder.DropTable( + name: "BCAuthorizeHistory"); + + migrationBuilder.DropTable( + name: "CertificateAuthorityRealm"); + + migrationBuilder.DropTable( + name: "ClaimProviders"); + + migrationBuilder.DropTable( + name: "ClientCertificate"); + + migrationBuilder.DropTable( + name: "ClientJsonWebKey"); + + migrationBuilder.DropTable( + name: "ClientRealm"); + + migrationBuilder.DropTable( + name: "ClientScope"); + + migrationBuilder.DropTable( + name: "ConfigurationDefinitionRecordTranslation"); + + migrationBuilder.DropTable( + name: "ConfigurationDefinitionRecordValueTranslation"); + + migrationBuilder.DropTable( + name: "ConfigurationKeyPairValueRecords"); + + migrationBuilder.DropTable( + name: "DataProtectionKeys"); + + migrationBuilder.DropTable( + name: "DeviceAuthCodes"); + + migrationBuilder.DropTable( + name: "ExtractedRepresentations"); + + migrationBuilder.DropTable( + name: "ExtractedRepresentationsStaging"); + + migrationBuilder.DropTable( + name: "GotifySessions"); + + migrationBuilder.DropTable( + name: "GroupRealm"); + + migrationBuilder.DropTable( + name: "GroupScope"); + + migrationBuilder.DropTable( + name: "GroupUser"); + + migrationBuilder.DropTable( + name: "IdentityProvisioningHistory"); + + migrationBuilder.DropTable( + name: "IdentityProvisioningMappingRule"); + + migrationBuilder.DropTable( + name: "IdentityProvisioningRealm"); + + migrationBuilder.DropTable( + name: "Languages"); + + migrationBuilder.DropTable( + name: "MessageBusErrorMessages"); + + migrationBuilder.DropTable( + name: "PresentationDefinitionFormat"); + + migrationBuilder.DropTable( + name: "PresentationDefinitionInputDescriptorConstraint"); + + migrationBuilder.DropTable( + name: "RealmScope"); + + migrationBuilder.DropTable( + name: "RealmSerializedFileKey"); + + migrationBuilder.DropTable( + name: "RealmUser"); + + migrationBuilder.DropTable( + name: "ScopeClaimMapper"); + + migrationBuilder.DropTable( + name: "Tokens"); + + migrationBuilder.DropTable( + name: "TranslationUMAResource"); + + migrationBuilder.DropTable( + name: "UmaPendingRequest"); + + migrationBuilder.DropTable( + name: "UMAPermissionTicketRecord"); + + migrationBuilder.DropTable( + name: "UMAResourcePermissionClaim"); + + migrationBuilder.DropTable( + name: "UserClaims"); + + migrationBuilder.DropTable( + name: "UserCredential"); + + migrationBuilder.DropTable( + name: "UserDevice"); + + migrationBuilder.DropTable( + name: "UserExternalAuthProvider"); + + migrationBuilder.DropTable( + name: "UserSession"); + + migrationBuilder.DropTable( + name: "ApiResources"); + + migrationBuilder.DropTable( + name: "AuthenticationSchemeProviders"); + + migrationBuilder.DropTable( + name: "AuthorizedScope"); + + migrationBuilder.DropTable( + name: "BCAuthorizeLst"); + + migrationBuilder.DropTable( + name: "CertificateAuthorities"); + + migrationBuilder.DropTable( + name: "ConfigurationDefinitionRecordValue"); + + migrationBuilder.DropTable( + name: "Groups"); + + migrationBuilder.DropTable( + name: "PresentationDefinitionInputDescriptor"); + + migrationBuilder.DropTable( + name: "SerializedFileKeys"); + + migrationBuilder.DropTable( + name: "Translations"); + + migrationBuilder.DropTable( + name: "UMAPermissionTicket"); + + migrationBuilder.DropTable( + name: "UMAResourcePermission"); + + migrationBuilder.DropTable( + name: "AuthenticationSchemeProviderDefinitions"); + + migrationBuilder.DropTable( + name: "Grants"); + + migrationBuilder.DropTable( + name: "ConfigurationDefinitionRecord"); + + migrationBuilder.DropTable( + name: "PresentationDefinitions"); + + migrationBuilder.DropTable( + name: "Clients"); + + migrationBuilder.DropTable( + name: "UmaResources"); + + migrationBuilder.DropTable( + name: "Scopes"); + + migrationBuilder.DropTable( + name: "Users"); + + migrationBuilder.DropTable( + name: "Definitions"); + + migrationBuilder.DropTable( + name: "Acrs"); + + migrationBuilder.DropTable( + name: "IdentityProvisioningLst"); + + migrationBuilder.DropTable( + name: "RegistrationWorkflows"); + + migrationBuilder.DropTable( + name: "IdentityProvisioningDefinitions"); + + migrationBuilder.DropTable( + name: "Realms"); + } + } +} diff --git a/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/StoreDbContextModelSnapshot.cs b/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/StoreDbContextModelSnapshot.cs new file mode 100644 index 000000000..0839cdaa4 --- /dev/null +++ b/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/Migrations/StoreDbContextModelSnapshot.cs @@ -0,0 +1,3228 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Oracle.EntityFrameworkCore.Metadata; +using SimpleIdServer.IdServer.Store.EF; + +#nullable disable + +namespace SimpleIdServer.IdServer.OracleMigrations.Migrations +{ + [DbContext(typeof(StoreDbContext))] + partial class StoreDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + OracleModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("ApiResourceRealm", b => + { + b.Property("ApiResourcesId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("ApiResourcesId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("ApiResourceRealm"); + }); + + modelBuilder.Entity("ApiResourceScope", b => + { + b.Property("ApiResourcesId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ScopesId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("ApiResourcesId", "ScopesId"); + + b.HasIndex("ScopesId"); + + b.ToTable("ApiResourceScope"); + }); + + modelBuilder.Entity("AuthenticationContextClassReferenceRealm", b => + { + b.Property("AuthenticationContextClassReferencesId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("AuthenticationContextClassReferencesId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("AuthenticationContextClassReferenceRealm"); + }); + + modelBuilder.Entity("AuthenticationSchemeProviderRealm", b => + { + b.Property("AuthenticationSchemeProvidersId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("AuthenticationSchemeProvidersId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("AuthenticationSchemeProviderRealm"); + }); + + modelBuilder.Entity("CertificateAuthorityRealm", b => + { + b.Property("CertificateAuthoritiesId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("CertificateAuthoritiesId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("CertificateAuthorityRealm"); + }); + + modelBuilder.Entity("ClientRealm", b => + { + b.Property("ClientsId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("ClientsId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("ClientRealm"); + }); + + modelBuilder.Entity("ClientScope", b => + { + b.Property("ClientsId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ScopesId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("ClientsId", "ScopesId"); + + b.HasIndex("ScopesId"); + + b.ToTable("ClientScope"); + }); + + modelBuilder.Entity("ConfigurationDefinitionRecordTranslation", b => + { + b.Property("ConfigurationDefinitionRecordId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("TranslationsId") + .HasColumnType("NUMBER(10)"); + + b.HasKey("ConfigurationDefinitionRecordId", "TranslationsId"); + + b.HasIndex("TranslationsId"); + + b.ToTable("ConfigurationDefinitionRecordTranslation"); + }); + + modelBuilder.Entity("ConfigurationDefinitionRecordValueTranslation", b => + { + b.Property("ConfigurationDefinitionRecordValueId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("TranslationsId") + .HasColumnType("NUMBER(10)"); + + b.HasKey("ConfigurationDefinitionRecordValueId", "TranslationsId"); + + b.HasIndex("TranslationsId"); + + b.ToTable("ConfigurationDefinitionRecordValueTranslation"); + }); + + modelBuilder.Entity("GroupScope", b => + { + b.Property("GroupsId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RolesId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("GroupsId", "RolesId"); + + b.HasIndex("RolesId"); + + b.ToTable("GroupScope"); + }); + + modelBuilder.Entity("IdentityProvisioningRealm", b => + { + b.Property("IdentityProvisioningLstId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("IdentityProvisioningLstId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("IdentityProvisioningRealm"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.DataProtectionKey", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("FriendlyName") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Xml") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.ToTable("DataProtectionKeys"); + }); + + modelBuilder.Entity("RealmScope", b => + { + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ScopesId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("RealmsName", "ScopesId"); + + b.HasIndex("ScopesId"); + + b.ToTable("RealmScope"); + }); + + modelBuilder.Entity("RealmSerializedFileKey", b => + { + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("SerializedFileKeysId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("RealmsName", "SerializedFileKeysId"); + + b.HasIndex("SerializedFileKeysId"); + + b.ToTable("RealmSerializedFileKey"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ApiResource", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Audience") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "aud"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Id"); + + b.ToTable("ApiResources"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuditEvent", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AuthMethod") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "auth_method"); + + b.Property("Claims") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "claims"); + + b.Property("ClientId") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "client_id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Description") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("ErrorMessage") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "error_message"); + + b.Property("EventName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("IsError") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_error"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "realm"); + + b.Property("RedirectUrl") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "redirect_url"); + + b.Property("RequestJSON") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "request_json"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "scopes"); + + b.Property("UserName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "username"); + + b.HasKey("Id"); + + b.ToTable("AuditEvents"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationContextClassReference", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AuthenticationMethodReferences") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "amrs"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("DisplayName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "display_name"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("RegistrationWorkflowId") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "workflow_id"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Id"); + + b.HasIndex("RegistrationWorkflowId"); + + b.ToTable("Acrs"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProvider", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("AuthSchemeProviderDefinitionName") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("DisplayName") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.HasIndex("AuthSchemeProviderDefinitionName"); + + b.ToTable("AuthenticationSchemeProviders"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProviderDefinition", b => + { + b.Property("Name") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("HandlerFullQualifiedName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "handler_full_qualifiedname"); + + b.Property("Image") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "img"); + + b.Property("OptionsFullQualifiedName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "options_full_qualifiedname"); + + b.Property("OptionsName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "options_name"); + + b.HasKey("Name"); + + b.ToTable("AuthenticationSchemeProviderDefinitions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProviderMapper", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("IdProviderId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("MapperType") + .HasColumnType("NUMBER(10)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("SourceClaimName") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("TargetUserAttribute") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("TargetUserProperty") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("IdProviderId"); + + b.ToTable("AuthenticationSchemeProviderMapper"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthorizedResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Audience") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("AuthorizedScopeId") + .HasColumnType("NUMBER(10)"); + + b.Property("Resource") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizedScopeId"); + + b.ToTable("AuthorizedResource"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthorizedScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConsentId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Scope") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "scope"); + + b.HasKey("Id"); + + b.HasIndex("ConsentId"); + + b.ToTable("AuthorizedScope"); + + b.HasAnnotation("Relational:JsonPropertyName", "scopes"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.BCAuthorize", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ClientId") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ExpirationDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Interval") + .HasColumnType("NUMBER(10)"); + + b.Property("LastStatus") + .HasColumnType("NUMBER(10)"); + + b.Property("NextFetchTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("NotificationEdp") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("NotificationMode") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("NotificationToken") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("RejectionSentDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("SerializedAuthorizationDetails") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("UserId") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.ToTable("BCAuthorizeLst"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.BCAuthorizeHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BCAuthorizeId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("EndDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Message") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("StartDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Status") + .HasColumnType("NUMBER(10)"); + + b.HasKey("Id"); + + b.HasIndex("BCAuthorizeId"); + + b.ToTable("BCAuthorizeHistory"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.CertificateAuthority", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("EndDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "end_datetime"); + + b.Property("FindType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "find_type"); + + b.Property("FindValue") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "find_value"); + + b.Property("PrivateKey") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "private_key"); + + b.Property("PublicKey") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "public_key"); + + b.Property("Source") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "source"); + + b.Property("StartDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "start_datetime"); + + b.Property("StoreLocation") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "store_location"); + + b.Property("StoreName") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "store_name"); + + b.Property("SubjectName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "subject_name"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Id"); + + b.ToTable("CertificateAuthorities"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ClaimProvider", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ClaimType") + .HasColumnType("NUMBER(10)"); + + b.Property("ConnectionString") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ProviderType") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.ToTable("ClaimProviders"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Client", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("AccessTokenType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "access_token_type"); + + b.Property("ApplicationType") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "application_type"); + + b.Property("AuthReqIdExpirationTimeInSeconds") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "auth_reqid_expirationtime"); + + b.Property("AuthenticationContextClassReferenceId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("AuthorizationDataTypes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "authorization_data_types"); + + b.Property("AuthorizationEncryptedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "authorization_encrypted_response_alg"); + + b.Property("AuthorizationEncryptedResponseEnc") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "authorization_encrypted_response_enc"); + + b.Property("AuthorizationSignedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "authorization_signed_response_alg"); + + b.Property("BCAuthenticationRequestSigningAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_authentication_request_signing_alg"); + + b.Property("BCClientNotificationEndpoint") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_client_notification_endpoint"); + + b.Property("BCIntervalSeconds") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "bc_interval"); + + b.Property("BCTokenDeliveryMode") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_token_delivery_mode"); + + b.Property("BCUserCodeParameter") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_user_code_parameter"); + + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_logout_session_required"); + + b.Property("BackChannelLogoutUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "backchannel_logout_uri"); + + b.Property("CNonceExpirationTimeInSeconds") + .HasColumnType("BINARY_DOUBLE"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "client_id"); + + b.Property("ClientSecret") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "client_secret"); + + b.Property("ClientSecretExpirationTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "client_secret_expires_at"); + + b.Property("ClientType") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "client_type"); + + b.Property("Contacts") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "contacts"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("CredentialOfferEndpoint") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "credential_offer_endpoint"); + + b.Property("DPOPBoundAccessTokens") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "dpop_bound_access_tokens"); + + b.Property("DPOPNonceLifetimeInSeconds") + .HasColumnType("BINARY_DOUBLE") + .HasAnnotation("Relational:JsonPropertyName", "dpop_lifetime"); + + b.Property("DefaultAcrValues") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "default_acr_values"); + + b.Property("DefaultMaxAge") + .HasColumnType("BINARY_DOUBLE") + .HasAnnotation("Relational:JsonPropertyName", "default_max_age"); + + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "frontchannel_logout_session_required"); + + b.Property("FrontChannelLogoutUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "frontchannel_logout_uri"); + + b.Property("GrantTypes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "grant_types"); + + b.Property("IdTokenEncryptedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "id_token_encrypted_response_alg"); + + b.Property("IdTokenEncryptedResponseEnc") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "id_token_encrypted_response_enc"); + + b.Property("IdTokenSignedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "id_token_signed_response_alg"); + + b.Property("InitiateLoginUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "initiate_login_uri"); + + b.Property("IsConsentDisabled") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_consent_disabled"); + + b.Property("IsDPOPNonceRequired") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "dpop_nonce_required"); + + b.Property("IsRedirectUrlCaseSensitive") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_redirect_url_casesensitive"); + + b.Property("IsResourceParameterRequired") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_resource_parameter_required"); + + b.Property("IsTokenExchangeEnabled") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_token_exchange_enabled"); + + b.Property("IsTransactionCodeRequired") + .HasColumnType("BOOLEAN"); + + b.Property("JwksUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "jwks_uri"); + + b.Property("PairWiseIdentifierSalt") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PostLogoutRedirectUris") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "post_logout_redirect_uris"); + + b.Property("PreAuthCodeExpirationTimeInSeconds") + .HasColumnType("BINARY_DOUBLE") + .HasAnnotation("Relational:JsonPropertyName", "pre_auth_code_expiration_time"); + + b.Property("PreferredTokenProfile") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "preferred_token_profile"); + + b.Property("RedirectToRevokeSessionUI") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "redirect_revoke_session_ui"); + + b.Property("RedirectionUrls") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "redirect_uris"); + + b.Property("RefreshTokenExpirationTimeInSeconds") + .HasColumnType("BINARY_DOUBLE") + .HasAnnotation("Relational:JsonPropertyName", "refresh_token_expiration_time_seconds"); + + b.Property("RegistrationAccessToken") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "registration_access_token"); + + b.Property("RequestObjectEncryptionAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "request_object_encryption_alg"); + + b.Property("RequestObjectEncryptionEnc") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "request_object_encryption_enc"); + + b.Property("RequestObjectSigningAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "request_object_signing_alg"); + + b.Property("RequireAuthTime") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "require_auth_time"); + + b.Property("ResponseTypes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "response_types"); + + b.Property("SectorIdentifierUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "sector_identifier_uri"); + + b.Property("SerializedParameters") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("SoftwareId") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "software_id"); + + b.Property("SoftwareVersion") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "software_version"); + + b.Property("SubjectType") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "subject_type"); + + b.Property("TlsClientAuthSanDNS") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_auth_san_dns"); + + b.Property("TlsClientAuthSanEmail") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_auth_san_email"); + + b.Property("TlsClientAuthSanIP") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_auth_san_ip"); + + b.Property("TlsClientAuthSanURI") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_auth_san_uri"); + + b.Property("TlsClientAuthSubjectDN") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_auth_subject_dn"); + + b.Property("TlsClientCertificateBoundAccessToken") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "tls_client_certificate_bound_access_token"); + + b.Property("TokenEncryptedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "token_encrypted_response_alg"); + + b.Property("TokenEncryptedResponseEnc") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "token_encrypted_response_enc"); + + b.Property("TokenEndPointAuthMethod") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "token_endpoint_auth_method"); + + b.Property("TokenExchangeType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "token_exchange_type"); + + b.Property("TokenExpirationTimeInSeconds") + .HasColumnType("BINARY_DOUBLE") + .HasAnnotation("Relational:JsonPropertyName", "token_expiration_time_seconds"); + + b.Property("TokenSignedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "token_signed_response_alg"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.Property("UserInfoEncryptedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "userinfo_encrypted_response_alg"); + + b.Property("UserInfoEncryptedResponseEnc") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "userinfo_encrypted_response_enc"); + + b.Property("UserInfoSignedResponseAlg") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "userinfo_signed_response_alg"); + + b.HasKey("Id"); + + b.HasIndex("AuthenticationContextClassReferenceId"); + + b.ToTable("Clients"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ClientCertificate", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CertificateAuthorityId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("EndDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "end_datetime"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("PrivateKey") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "private_key"); + + b.Property("PublicKey") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "public_key"); + + b.Property("StartDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "start_datetime"); + + b.HasKey("Id"); + + b.HasIndex("CertificateAuthorityId"); + + b.ToTable("ClientCertificate"); + + b.HasAnnotation("Relational:JsonPropertyName", "client_certificates"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ClientJsonWebKey", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Alg") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "alg"); + + b.Property("ClientId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("KeyType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "key_type"); + + b.Property("Kid") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "kid"); + + b.Property("SerializedJsonWebKey") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "serialized_jwk"); + + b.Property("Usage") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "usage"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientJsonWebKey"); + + b.HasAnnotation("Relational:JsonPropertyName", "serialized_jwks"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinition", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("FullQualifiedName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.ToTable("Definitions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ConfigurationDefinitionId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("DisplayCondition") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("IsRequired") + .HasColumnType("BOOLEAN"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Order") + .HasColumnType("NUMBER(10)"); + + b.Property("Type") + .HasColumnType("NUMBER(10)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigurationDefinitionId"); + + b.ToTable("ConfigurationDefinitionRecord"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecordValue", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ConfigurationDefinitionRecordId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("ConfigurationDefinitionRecordId"); + + b.ToTable("ConfigurationDefinitionRecordValue"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationKeyPairValueRecord", b => + { + b.Property("Name") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Name"); + + b.ToTable("ConfigurationKeyPairValueRecords"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Consent", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Claims") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "claims"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "client_id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ScopeId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("SerializedAuthorizationDetails") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Status") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "status"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("ScopeId"); + + b.HasIndex("UserId"); + + b.ToTable("Grants"); + + b.HasAnnotation("Relational:JsonPropertyName", "consents"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.DeviceAuthCode", b => + { + b.Property("DeviceCode") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("ExpirationDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("LastAccessTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("NextAccessDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Status") + .HasColumnType("NUMBER(10)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UserId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("UserLogin") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("DeviceCode"); + + b.HasIndex("ClientId"); + + b.HasIndex("UserId"); + + b.ToTable("DeviceAuthCodes"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ExtractedRepresentation", b => + { + b.Property("ExternalId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Version") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("ExternalId"); + + b.ToTable("ExtractedRepresentations"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ExtractedRepresentationStaging", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("GroupIds") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("IdProvisioningProcessId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("RepresentationId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("RepresentationVersion") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Type") + .HasColumnType("NUMBER(10)"); + + b.Property("Values") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.ToTable("ExtractedRepresentationsStaging"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.GotifySession", b => + { + b.Property("ApplicationToken") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ClientToken") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("ApplicationToken"); + + b.ToTable("GotifySessions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Group", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("FullPath") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "full_path"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("ParentGroupId") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "parent_group_id"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Id"); + + b.HasIndex("ParentGroupId"); + + b.ToTable("Groups"); + + b.HasAnnotation("Relational:JsonPropertyName", "group"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.GroupRealm", b => + { + b.Property("GroupsId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("GroupsId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("GroupRealm"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.GroupUser", b => + { + b.Property("GroupsId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("UsersId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("GroupsId", "UsersId"); + + b.HasIndex("UsersId"); + + b.ToTable("GroupUser"); + + b.HasAnnotation("Relational:JsonPropertyName", "groups"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioning", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("DefinitionName") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("IsEnabled") + .HasColumnType("BOOLEAN"); + + b.Property("Name") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.HasIndex("DefinitionName"); + + b.ToTable("IdentityProvisioningLst"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningDefinition", b => + { + b.Property("Name") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("OptionsFullQualifiedName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("OptionsName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Name"); + + b.ToTable("IdentityProvisioningDefinitions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CurrentPage") + .HasColumnType("NUMBER(10)"); + + b.Property("ExecutionDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("IdentityProvisioningId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("NbFilteredRepresentations") + .HasColumnType("NUMBER(10)"); + + b.Property("NbGroups") + .HasColumnType("NUMBER(10)"); + + b.Property("NbUsers") + .HasColumnType("NUMBER(10)"); + + b.Property("ProcessId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Status") + .HasColumnType("NUMBER(10)"); + + b.Property("TotalPages") + .HasColumnType("NUMBER(10)"); + + b.HasKey("Id"); + + b.HasIndex("IdentityProvisioningId"); + + b.ToTable("IdentityProvisioningHistory"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningMappingRule", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("From") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("HasMultipleAttribute") + .HasColumnType("BOOLEAN"); + + b.Property("IdentityProvisioningDefinitionName") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("MapperType") + .HasColumnType("NUMBER(10)"); + + b.Property("TargetUserAttribute") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("TargetUserProperty") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Usage") + .HasColumnType("NUMBER(10)"); + + b.HasKey("Id"); + + b.HasIndex("IdentityProvisioningDefinitionName"); + + b.ToTable("IdentityProvisioningMappingRule"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Language", b => + { + b.Property("Code") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "code"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Code"); + + b.ToTable("Languages"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.MessageBusErrorMessage", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Content") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Exceptions") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ExternalId") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("FullName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("QueueName") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ReceivedDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.ToTable("MessageBusErrorMessages"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinition", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Name") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("PublicId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Purpose") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "purpose"); + + b.Property("RealmName") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("RealmName"); + + b.ToTable("PresentationDefinitions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionFormat", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Format") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PresentationDefinitionInputDescriptorId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("ProofType") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("PresentationDefinitionInputDescriptorId"); + + b.ToTable("PresentationDefinitionFormat"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptor", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Name") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("PresentationDefinitionId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("PublicId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Purpose") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "purpose"); + + b.HasKey("Id"); + + b.HasIndex("PresentationDefinitionId"); + + b.ToTable("PresentationDefinitionInputDescriptor"); + + b.HasAnnotation("Relational:JsonPropertyName", "input_descriptors"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptorConstraint", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Filter") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Path") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PresentationDefinitionInputDescriptorId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("PresentationDefinitionInputDescriptorId"); + + b.ToTable("PresentationDefinitionInputDescriptorConstraint"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Realm", b => + { + b.Property("Name") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Name"); + + b.ToTable("Realms"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.RealmUser", b => + { + b.Property("UsersId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("RealmsName") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("UsersId", "RealmsName"); + + b.HasIndex("RealmsName"); + + b.ToTable("RealmUser"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.RegistrationWorkflow", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("IsDefault") + .HasColumnType("BOOLEAN"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("RealmName") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Steps") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.HasIndex("RealmName"); + + b.ToTable("RegistrationWorkflows"); + + b.HasAnnotation("Relational:JsonPropertyName", "registration_workflow"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Scope", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Description") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "description"); + + b.Property("IsExposedInConfigurationEdp") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_exposed"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("Protocol") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "protocol"); + + b.Property("Type") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "type"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "update_datetime"); + + b.HasKey("Id"); + + b.ToTable("Scopes"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ScopeClaimMapper", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("IncludeInAccessToken") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "include_in_accesstoken"); + + b.Property("IsMultiValued") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_multivalued"); + + b.Property("MapperType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "mapper_type"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("SAMLAttributeName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "saml_attribute_name"); + + b.Property("ScopeId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("SourceUserAttribute") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "source_user_attribute"); + + b.Property("SourceUserProperty") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "source_user_property"); + + b.Property("TargetClaimPath") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "target_claim_path"); + + b.Property("TokenClaimJsonType") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "token_claim_json_type"); + + b.HasKey("Id"); + + b.HasIndex("ScopeId"); + + b.ToTable("ScopeClaimMapper"); + + b.HasAnnotation("Relational:JsonPropertyName", "mappers"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.SerializedFileKey", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Alg") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Enc") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("IsSymmetric") + .HasColumnType("BOOLEAN"); + + b.Property("Key") + .HasColumnType("RAW(2000)"); + + b.Property("KeyId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PrivateKeyPem") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PublicKeyPem") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Usage") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.ToTable("SerializedFileKeys"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Token", b => + { + b.Property("PkID") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("PkID")); + + b.Property("AccessTokenType") + .HasColumnType("NUMBER(10)"); + + b.Property("AuthorizationCode") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Data") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ExpirationTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("GrantId") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Id") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Jkt") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("OriginalData") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("SessionId") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("TokenType") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("PkID"); + + b.ToTable("Tokens"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Translation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClientId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Key") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Language") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Value") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("Translations"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPendingRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Owner") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Requester") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("ResourceId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Status") + .HasColumnType("NUMBER(10)"); + + b.Property("TicketId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("ResourceId"); + + b.ToTable("UmaPendingRequest"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPermissionTicket", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.ToTable("UMAPermissionTicket"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPermissionTicketRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ResourceId") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UMAPermissionTicketId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("UMAPermissionTicketId"); + + b.ToTable("UMAPermissionTicketRecord"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResource", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "_id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("IconUri") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "icon_uri"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "resource_scopes"); + + b.Property("Subject") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Type") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "type"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.HasKey("Id"); + + b.ToTable("UmaResources"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResourcePermission", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("Scopes") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "scopes"); + + b.Property("UMAResourceId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("UMAResourceId"); + + b.ToTable("UMAResourcePermission"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResourcePermissionClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "claim_type"); + + b.Property("FriendlyName") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "friendly_name"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("UMAResourcePermissionId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "value"); + + b.HasKey("Id"); + + b.HasIndex("UMAResourcePermissionId"); + + b.ToTable("UMAResourcePermissionClaim"); + + b.HasAnnotation("Relational:JsonPropertyName", "claims"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.User", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "createDateTime"); + + b.Property("DeviceRegistrationToken") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "device_registration_token"); + + b.Property("Email") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "email"); + + b.Property("EmailVerified") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "emailVerified"); + + b.Property("EncodedPicture") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Firstname") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "firstname"); + + b.Property("IdentityProvisioningId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Lastname") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "lastname"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("NbLoginAttempt") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "nb_login_attempt"); + + b.Property("NotificationMode") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "notification_mode"); + + b.Property("Source") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "source"); + + b.Property("Status") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "status"); + + b.Property("UnblockDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "unblock_datetime"); + + b.Property("UpdateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "updateDateTime"); + + b.HasKey("Id"); + + b.HasIndex("IdentityProvisioningId"); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserClaim", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("Name") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "name"); + + b.Property("Type") + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "type"); + + b.Property("UserId") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "value"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserClaims"); + + b.HasAnnotation("Relational:JsonPropertyName", "claims"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserCredential", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("CredentialType") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "type"); + + b.Property("HOTPWindow") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "hotp_window"); + + b.Property("IsActive") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "active"); + + b.Property("OTPAlg") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "otp_alg"); + + b.Property("OTPCounter") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "otp_counter"); + + b.Property("TOTPStep") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "totp_step"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "value"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserCredential"); + + b.HasAnnotation("Relational:JsonPropertyName", "credentials"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserDevice", b => + { + b.Property("Id") + .HasColumnType("NVARCHAR2(450)"); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)"); + + b.Property("DeviceType") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Manufacturer") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Model") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("Name") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PushToken") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("PushType") + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.Property("Version") + .HasColumnType("NVARCHAR2(2000)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserDevice"); + + b.HasAnnotation("Relational:JsonPropertyName", "devices"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserExternalAuthProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("NUMBER(10)"); + + OraclePropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreateDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "create_datetime"); + + b.Property("Scheme") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "scheme"); + + b.Property("Subject") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "sub"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserExternalAuthProvider"); + + b.HasAnnotation("Relational:JsonPropertyName", "external_auth_providers"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserSession", b => + { + b.Property("SessionId") + .HasColumnType("NVARCHAR2(450)") + .HasAnnotation("Relational:JsonPropertyName", "session_id"); + + b.Property("AuthenticationDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "auth_datetime"); + + b.Property("ExpirationDateTime") + .HasColumnType("TIMESTAMP(7)") + .HasAnnotation("Relational:JsonPropertyName", "exp_datetime"); + + b.Property("IsClientsNotified") + .HasColumnType("BOOLEAN") + .HasAnnotation("Relational:JsonPropertyName", "is_clients_notified"); + + b.Property("Realm") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)") + .HasAnnotation("Relational:JsonPropertyName", "realm"); + + b.Property("SerializedClientIds") + .IsRequired() + .HasColumnType("NVARCHAR2(2000)"); + + b.Property("State") + .HasColumnType("NUMBER(10)") + .HasAnnotation("Relational:JsonPropertyName", "state"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("SessionId"); + + b.HasIndex("UserId"); + + b.ToTable("UserSession"); + + b.HasAnnotation("Relational:JsonPropertyName", "sessions"); + }); + + modelBuilder.Entity("TranslationUMAResource", b => + { + b.Property("TranslationsId") + .HasColumnType("NUMBER(10)"); + + b.Property("UMAResourceId") + .HasColumnType("NVARCHAR2(450)"); + + b.HasKey("TranslationsId", "UMAResourceId"); + + b.HasIndex("UMAResourceId"); + + b.ToTable("TranslationUMAResource"); + }); + + modelBuilder.Entity("ApiResourceRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ApiResource", null) + .WithMany() + .HasForeignKey("ApiResourcesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ApiResourceScope", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ApiResource", null) + .WithMany() + .HasForeignKey("ApiResourcesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", null) + .WithMany() + .HasForeignKey("ScopesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("AuthenticationContextClassReferenceRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthenticationContextClassReference", null) + .WithMany() + .HasForeignKey("AuthenticationContextClassReferencesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("AuthenticationSchemeProviderRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProvider", null) + .WithMany() + .HasForeignKey("AuthenticationSchemeProvidersId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("CertificateAuthorityRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.CertificateAuthority", null) + .WithMany() + .HasForeignKey("CertificateAuthoritiesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ClientRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Client", null) + .WithMany() + .HasForeignKey("ClientsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ClientScope", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Client", null) + .WithMany() + .HasForeignKey("ClientsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", null) + .WithMany() + .HasForeignKey("ScopesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ConfigurationDefinitionRecordTranslation", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecord", null) + .WithMany() + .HasForeignKey("ConfigurationDefinitionRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Translation", null) + .WithMany() + .HasForeignKey("TranslationsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ConfigurationDefinitionRecordValueTranslation", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecordValue", null) + .WithMany() + .HasForeignKey("ConfigurationDefinitionRecordValueId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Translation", null) + .WithMany() + .HasForeignKey("TranslationsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("GroupScope", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Group", null) + .WithMany() + .HasForeignKey("GroupsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", null) + .WithMany() + .HasForeignKey("RolesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("IdentityProvisioningRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.IdentityProvisioning", null) + .WithMany() + .HasForeignKey("IdentityProvisioningLstId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("RealmScope", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", null) + .WithMany() + .HasForeignKey("ScopesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("RealmSerializedFileKey", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", null) + .WithMany() + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.SerializedFileKey", null) + .WithMany() + .HasForeignKey("SerializedFileKeysId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationContextClassReference", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.RegistrationWorkflow", "RegistrationWorkflow") + .WithMany("Acrs") + .HasForeignKey("RegistrationWorkflowId"); + + b.Navigation("RegistrationWorkflow"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProvider", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProviderDefinition", "AuthSchemeProviderDefinition") + .WithMany("AuthSchemeProviders") + .HasForeignKey("AuthSchemeProviderDefinitionName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuthSchemeProviderDefinition"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProviderMapper", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProvider", "IdProvider") + .WithMany("Mappers") + .HasForeignKey("IdProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("IdProvider"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthorizedResource", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthorizedScope", null) + .WithMany("AuthorizedResources") + .HasForeignKey("AuthorizedScopeId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthorizedScope", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Consent", "Consent") + .WithMany("Scopes") + .HasForeignKey("ConsentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Consent"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.BCAuthorizeHistory", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.BCAuthorize", null) + .WithMany("Histories") + .HasForeignKey("BCAuthorizeId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Client", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.AuthenticationContextClassReference", null) + .WithMany("Clients") + .HasForeignKey("AuthenticationContextClassReferenceId"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ClientCertificate", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.CertificateAuthority", "CertificateAuthority") + .WithMany("ClientCertificates") + .HasForeignKey("CertificateAuthorityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CertificateAuthority"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ClientJsonWebKey", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Client", null) + .WithMany("SerializedJsonWebKeys") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecord", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ConfigurationDefinition", null) + .WithMany("Records") + .HasForeignKey("ConfigurationDefinitionId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecordValue", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecord", null) + .WithMany("Values") + .HasForeignKey("ConfigurationDefinitionRecordId"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Consent", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", null) + .WithMany("Consents") + .HasForeignKey("ScopeId"); + + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Consents") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.DeviceAuthCode", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Client", "Client") + .WithMany("DeviceAuthCodes") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany() + .HasForeignKey("UserId"); + + b.Navigation("Client"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Group", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Group", "ParentGroup") + .WithMany("Children") + .HasForeignKey("ParentGroupId"); + + b.Navigation("ParentGroup"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.GroupRealm", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Group", "Group") + .WithMany("Realms") + .HasForeignKey("GroupsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", "Realm") + .WithMany("Groups") + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("Realm"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.GroupUser", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Group", "Group") + .WithMany("Users") + .HasForeignKey("GroupsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Groups") + .HasForeignKey("UsersId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioning", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.IdentityProvisioningDefinition", "Definition") + .WithMany("Instances") + .HasForeignKey("DefinitionName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Definition"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningHistory", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.IdentityProvisioning", "IdentityProvisioning") + .WithMany("Histories") + .HasForeignKey("IdentityProvisioningId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("IdentityProvisioning"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningMappingRule", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.IdentityProvisioningDefinition", "IdentityProvisioningDefinition") + .WithMany("MappingRules") + .HasForeignKey("IdentityProvisioningDefinitionName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("IdentityProvisioningDefinition"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinition", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", "Realm") + .WithMany("PresentationDefinitions") + .HasForeignKey("RealmName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Realm"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionFormat", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptor", null) + .WithMany("Format") + .HasForeignKey("PresentationDefinitionInputDescriptorId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptor", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.PresentationDefinition", null) + .WithMany("InputDescriptors") + .HasForeignKey("PresentationDefinitionId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptorConstraint", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptor", null) + .WithMany("Constraints") + .HasForeignKey("PresentationDefinitionInputDescriptorId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.RealmUser", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", "Realm") + .WithMany("Users") + .HasForeignKey("RealmsName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Realms") + .HasForeignKey("UsersId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Realm"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.RegistrationWorkflow", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Realm", "Realm") + .WithMany("RegistrationWorkflows") + .HasForeignKey("RealmName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Realm"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ScopeClaimMapper", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Scope", "Scope") + .WithMany("ClaimMappers") + .HasForeignKey("ScopeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Scope"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Translation", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Client", null) + .WithMany("Translations") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPendingRequest", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.UMAResource", "Resource") + .WithMany() + .HasForeignKey("ResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resource"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPermissionTicketRecord", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.UMAPermissionTicket", null) + .WithMany("Records") + .HasForeignKey("UMAPermissionTicketId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResourcePermission", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.UMAResource", null) + .WithMany("Permissions") + .HasForeignKey("UMAResourceId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResourcePermissionClaim", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.UMAResourcePermission", null) + .WithMany("Claims") + .HasForeignKey("UMAResourcePermissionId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.User", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.IdentityProvisioning", "IdentityProvisioning") + .WithMany("Users") + .HasForeignKey("IdentityProvisioningId"); + + b.Navigation("IdentityProvisioning"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserClaim", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("OAuthUserClaims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserCredential", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Credentials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserDevice", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Devices") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserExternalAuthProvider", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("ExternalAuthProviders") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UserSession", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.User", "User") + .WithMany("Sessions") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("TranslationUMAResource", b => + { + b.HasOne("SimpleIdServer.IdServer.Domains.Translation", null) + .WithMany() + .HasForeignKey("TranslationsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimpleIdServer.IdServer.Domains.UMAResource", null) + .WithMany() + .HasForeignKey("UMAResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationContextClassReference", b => + { + b.Navigation("Clients"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProvider", b => + { + b.Navigation("Mappers"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthenticationSchemeProviderDefinition", b => + { + b.Navigation("AuthSchemeProviders"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.AuthorizedScope", b => + { + b.Navigation("AuthorizedResources"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.BCAuthorize", b => + { + b.Navigation("Histories"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.CertificateAuthority", b => + { + b.Navigation("ClientCertificates"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Client", b => + { + b.Navigation("DeviceAuthCodes"); + + b.Navigation("SerializedJsonWebKeys"); + + b.Navigation("Translations"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinition", b => + { + b.Navigation("Records"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.ConfigurationDefinitionRecord", b => + { + b.Navigation("Values"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Consent", b => + { + b.Navigation("Scopes"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Group", b => + { + b.Navigation("Children"); + + b.Navigation("Realms"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioning", b => + { + b.Navigation("Histories"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.IdentityProvisioningDefinition", b => + { + b.Navigation("Instances"); + + b.Navigation("MappingRules"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinition", b => + { + b.Navigation("InputDescriptors"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.PresentationDefinitionInputDescriptor", b => + { + b.Navigation("Constraints"); + + b.Navigation("Format"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Realm", b => + { + b.Navigation("Groups"); + + b.Navigation("PresentationDefinitions"); + + b.Navigation("RegistrationWorkflows"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.RegistrationWorkflow", b => + { + b.Navigation("Acrs"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.Scope", b => + { + b.Navigation("ClaimMappers"); + + b.Navigation("Consents"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAPermissionTicket", b => + { + b.Navigation("Records"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResource", b => + { + b.Navigation("Permissions"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.UMAResourcePermission", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("SimpleIdServer.IdServer.Domains.User", b => + { + b.Navigation("Consents"); + + b.Navigation("Credentials"); + + b.Navigation("Devices"); + + b.Navigation("ExternalAuthProviders"); + + b.Navigation("Groups"); + + b.Navigation("OAuthUserClaims"); + + b.Navigation("Realms"); + + b.Navigation("Sessions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/SimpleIdServer.IdServer.OracleMigrations.csproj b/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/SimpleIdServer.IdServer.OracleMigrations.csproj new file mode 100644 index 000000000..71586caf3 --- /dev/null +++ b/src/IdServer/SimpleIdServer.IdServer.OracleMigrations/SimpleIdServer.IdServer.OracleMigrations.csproj @@ -0,0 +1,14 @@ + + + net8.0 + + + + + + + + + + + \ No newline at end of file diff --git a/src/IdServer/SimpleIdServer.IdServer.Startup/Configurations/DistributedCacheConfiguration.cs b/src/IdServer/SimpleIdServer.IdServer.Startup/Configurations/DistributedCacheConfiguration.cs index f017b8d1e..79382b036 100644 --- a/src/IdServer/SimpleIdServer.IdServer.Startup/Configurations/DistributedCacheConfiguration.cs +++ b/src/IdServer/SimpleIdServer.IdServer.Startup/Configurations/DistributedCacheConfiguration.cs @@ -16,5 +16,6 @@ public enum DistributedCacheTypes REDIS = 2, POSTGRE = 3, MYSQL = 4, - SQLITE = 5 + SQLITE = 5, + ORACLE = 6 } diff --git a/src/IdServer/SimpleIdServer.IdServer.Startup/Configurations/StorageConfiguration.cs b/src/IdServer/SimpleIdServer.IdServer.Startup/Configurations/StorageConfiguration.cs index 8a57d56cd..22ce09e3d 100644 --- a/src/IdServer/SimpleIdServer.IdServer.Startup/Configurations/StorageConfiguration.cs +++ b/src/IdServer/SimpleIdServer.IdServer.Startup/Configurations/StorageConfiguration.cs @@ -14,6 +14,7 @@ public enum StorageTypes SQLSERVER = 1, POSTGRE = 2, MYSQL = 3, - SQLITE = 4 + SQLITE = 4, + ORACLE = 5 } } \ No newline at end of file diff --git a/src/IdServer/SimpleIdServer.IdServer.Startup/Program.cs b/src/IdServer/SimpleIdServer.IdServer.Startup/Program.cs index f9dc1d37f..00661152b 100644 --- a/src/IdServer/SimpleIdServer.IdServer.Startup/Program.cs +++ b/src/IdServer/SimpleIdServer.IdServer.Startup/Program.cs @@ -265,6 +265,13 @@ void ConfigureStorage(DbContextOptionsBuilder b) var conf = section.Get(); 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 => { diff --git a/src/IdServer/SimpleIdServer.IdServer.Startup/SimpleIdServer.IdServer.Startup.csproj b/src/IdServer/SimpleIdServer.IdServer.Startup/SimpleIdServer.IdServer.Startup.csproj index ee4e4815e..c7d91449a 100644 --- a/src/IdServer/SimpleIdServer.IdServer.Startup/SimpleIdServer.IdServer.Startup.csproj +++ b/src/IdServer/SimpleIdServer.IdServer.Startup/SimpleIdServer.IdServer.Startup.csproj @@ -14,6 +14,7 @@ + @@ -30,6 +31,7 @@ + diff --git a/src/IdServer/SimpleIdServer.IdServer.Startup/appsettings.json b/src/IdServer/SimpleIdServer.IdServer.Startup/appsettings.json index 48ce1c13f..8035b70b0 100644 --- a/src/IdServer/SimpleIdServer.IdServer.Startup/appsettings.json +++ b/src/IdServer/SimpleIdServer.IdServer.Startup/appsettings.json @@ -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": {