From 4d00e7865772d18e3162e58ac045600bc09cacdb Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Tue, 24 Mar 2026 22:31:52 +0100 Subject: [PATCH] Update dotnet (#1301) * Update dotnet * Fix build. * Fix tests. * Update command. * Fix tests * Test * Test another update. * Revert change. * Improve tests. * Improve usage. * Fix tests hopefully. * Increase timeout. * Ignore tests for now. * Another test. --- .github/workflows/dev.yml | 8 +- Dockerfile | 6 +- backend/.editorconfig | 16 +- backend/Squidex.sln | 321 ---- backend/Squidex.slnx | 43 + .../APM/Zipkin/ZipkinPlugin.cs | 37 - .../Actions/Kafka/KafkaProducer.cs | 7 +- .../Squidex.Extensions.csproj | 37 +- backend/global.json | 5 - .../Squidex.Translator.csproj | 2 +- backend/src/Migrations/Migrations.csproj | 6 +- .../Apps/Entities/Apps/EFAppRepository.cs | 3 +- .../EFAssetFolderRepository_SnapshotStore.cs | 2 +- .../Assets/EFAssetRepository_SnapshotStore.cs | 2 +- .../Apps/Entities/Contents/Extensions.cs | 2 +- .../Entities/Schemas/EFSchemaRepository.cs | 2 +- .../Apps/Entities/Teams/EFTeamRepository.cs | 2 +- .../Infrastructure/BulkInserter.cs | 2 +- .../Infrastructure/Extensions.cs | 4 +- .../Infrastructure/States/EFSnapshotStore.cs | 2 +- .../20260323154443_MigrateToNet10.Designer.cs | 1628 ++++++++++++++++ .../20260323154443_MigrateToNet10.cs | 46 + .../Migrations/MySqlDbContextModelSnapshot.cs | 7 +- .../Providers/MySql/Content/JsonFunction.cs | 5 - .../Providers/MySql/JsonFunction.cs | 2 +- .../20260323155026_MigrateToNet10.Designer.cs | 1629 ++++++++++++++++ .../20260323155026_MigrateToNet10.cs | 36 + .../PostgresDbContextModelSnapshot.cs | 7 +- .../PostgresAppDbContextDesignTimeFactory.cs | 2 +- .../20260323155035_MigrateToNet10.Designer.cs | 1631 +++++++++++++++++ .../20260323155035_MigrateToNet10.cs | 36 + .../SqlServerDbContextModelSnapshot.cs | 7 +- .../SqlServerAppDbContextDesignTimeFactory.cs | 2 +- .../ServiceExtensions.cs | 10 + .../Squidex.Data.EntityFramework.csproj | 56 +- .../docker-compose.yml | 4 +- .../Apps/Entities/Assets/MongoAssetEntity.cs | 6 +- .../Entities/Assets/MongoAssetFolderEntity.cs | 6 +- .../Assets/MongoAssetFolderRepository.cs | 5 - ...ongoAssetFolderRepository_SnapshotStore.cs | 2 +- ...mClassMap.cs => MongoAssetItemClassMap.cs} | 8 +- .../Entities/Assets/MongoAssetRepository.cs | 5 - .../MongoAssetRepository_SnapshotStore.cs | 2 +- .../Entities/Contents/MongoContentEntity.cs | 8 +- .../Contents/MongoContentRepository.cs | 9 - .../Entities/Contents/Text/AtlasTextIndex.cs | 2 +- .../Contents/Text/MongoTextIndexerState.cs | 15 - .../Contents/Text/MongoTextStateClassMap.cs | 25 + .../Entities/History/MongoHistoryClassMap.cs | 27 + .../History/MongoHistoryEventRepository.cs | 10 - ...yClassMap.cs => MongoAppEntityClassMap.cs} | 8 +- ...tityClassMap.cs => MongoEntityClassMap.cs} | 6 +- .../Users/IdentityUserForwardingSerializer.cs | 37 + .../Domain/Users/MongoIdentityClassMap.cs | 116 ++ .../Domain/Users/MongoRoleStore.cs | 16 - .../Domain/Users/MongoUserStore.cs | 125 +- .../Infrastructure/BsonDomainIdSerializer.cs | 11 +- .../Infrastructure/MongoClientFactory.cs | 37 - .../Infrastructure/MongoExtensions.cs | 5 - .../MongoClientFactory.cs | 59 + .../Squidex.Data.MongoDb/ServiceExtensions.cs | 16 +- .../Squidex.Data.MongoDb.csproj | 29 +- .../Squidex.Domain.Apps.Core.Model.csproj | 13 +- .../GenerateJsonSchema/JsonTypeVisitor.cs | 3 +- .../Extensions/EventFluidExtensions.cs | 12 +- .../Scripting/JintScriptEngine.cs | 11 +- .../Scripting/ScriptExecutionContext.cs | 10 +- ...Squidex.Domain.Apps.Core.Operations.csproj | 21 +- .../Extensions/JsonArrayFluidValue.cs | 4 +- .../Apps/DefaultAppLogStore.cs | 2 +- .../Squidex.Domain.Apps.Entities.csproj | 32 +- .../Squidex.Domain.Apps.Events.csproj | 6 +- .../Squidex.Domain.Users.csproj | 10 +- .../CollectionExtensions.cs | 5 - .../DisposableObjectBase.cs | 2 +- .../EventSourcing/EnvelopeExtensions.cs | 3 +- .../Json/Objects/JsonValue.cs | 2 +- .../Queries/OData/ConstantWithTypeVisitor.cs | 10 +- .../Squidex.Infrastructure.csproj | 38 +- .../src/Squidex.Shared/Squidex.Shared.csproj | 5 +- .../Pipeline/ActionContextLogAppender.cs | 15 +- .../Squidex.Web/Pipeline/UsagePipeWriter.cs | 4 + backend/src/Squidex.Web/Squidex.Web.csproj | 12 +- .../Config/ApplicationExtensions.cs | 12 +- .../Config/ApplicationManager.cs | 8 +- .../Config/DynamicApplicationStore.cs | 4 +- .../Config/IdentityServerServices.cs | 10 +- .../Connect/AuthorizationController.cs | 2 +- .../Config/Domain/EventSourcingServices.cs | 11 - backend/src/Squidex/Config/Web/WebServices.cs | 4 +- backend/src/Squidex/Squidex.csproj | 88 +- .../Squidex.Data.Tests.CodeGenerator.csproj | 6 +- .../Migrations/MySqlMigrationTests.cs | 8 +- .../Migrations/PostgresMigrationTests.cs | 9 +- .../Migrations/SqlServerMigrationTests.cs | 10 +- .../TestHelpers/MySqlFixture.cs | 14 +- .../TestHelpers/PostgresFixture.cs | 15 +- .../TestHelpers/SqlServerFixture.cs | 17 +- .../EntityFramework/TestHelpers/TestEntity.cs | 1 - .../MongoDb/Domain/Assets/AssetQueryTests.cs | 10 +- .../MongoDb/Domain/Contents/AdaptionTests.cs | 7 +- .../Domain/Contents/ContentMappingTests.cs | 1 + .../Domain/Contents/ContentQueryTests.cs | 13 +- .../Domain/Contents/ExtensionsTests.cs | 6 +- .../Domain/Contents/IndexParserTests.cs | 6 +- .../Domain/Contents/Text/AtlasParsingTests.cs | 2 +- .../Contents/Text/AtlasTextIndexFixture.cs | 11 +- .../MongoDb/Domain/Contents/TokenizerTests.cs | 1 + .../Domain/Schemas/MongoSchemasHashTests.cs | 6 +- .../Infrastructure/DomainIdSerializerTests.cs | 10 +- .../EventConsumerProcessorIntegrationTests.cs | 1 + .../EventSourcing/MongoEventStoreFixture.cs | 15 +- .../MongoDb/Infrastructure/NamedIdTests.cs | 10 - .../Infrastructure/Queries/MongoQueryTests.cs | 9 +- .../MongoDb/TestHelpers/DocumentDbFixture.cs | 4 +- .../MongoDb/TestHelpers/MongoFixture.cs | 17 +- .../TestHelpers/MongoSerializerFixture.cs | 26 + .../MongoDb/TestHelpers/MongoTestUtils.cs | 19 +- .../Shared/AssetFolderRepositoryTests.cs | 2 +- .../Shared/AssetRepositoryTests.cs | 2 +- .../Shared/SnapshotStoreTests_T.cs | 6 +- .../Squidex.Data.Tests.csproj | 34 +- .../ConvertContent/DefaultValuesTests.cs | 9 +- .../HandleRules/ExpressionsAttribute.cs | 26 +- .../Scripting/JintScriptEngineTests.cs | 26 - .../Squidex.Domain.Apps.Core.Tests.csproj | 22 +- ...kerTest.cs => UsageNotifierWorkerTests.cs} | 4 +- ...ontentsBulkUpdateCommandMiddlewareTests.cs | 20 +- .../Contents/GraphQL/TestContent.cs | 7 +- .../Contents/Text/AzureTextIndexFixture.cs | 8 +- .../Text/ElasticSearchTextIndexFixture.cs | 10 +- .../Text/OpenSearchTextIndexFixture.cs | 8 +- .../Squidex.Domain.Apps.Entities.Tests.csproj | 38 +- .../TestHelpers/VerifySettings.cs | 4 +- .../DefaultUserServiceTests.cs | 19 +- .../Squidex.Domain.Users.Tests.csproj | 16 +- .../Json/Objects/JsonObjectTests.cs | 5 +- .../Migrations/MigratorTests.cs | 2 +- .../Squidex.Infrastructure.Tests.csproj | 26 +- .../States/PersistenceEventSourcingTests.cs | 2 +- .../Squidex.Web.Tests.csproj | 16 +- .../GenerateLanguages.csproj | 2 +- frontend/generator/Generator/Generator.csproj | 2 +- tools/.editorconfig | 22 +- .../TestSuite.ApiTests/ContentQueryFixture.cs | 10 +- .../TestSuite.ApiTests/GraphQLFixture.cs | 14 +- .../GraphQLSubscriptionTests.cs | 5 +- .../TestSuite.ApiTests.csproj | 20 +- .../TestSuite.LoadTests/ReadingBenchmarks.cs | 1 - .../TestSuite.LoadTests/ReadingFixture.cs | 4 +- tools/TestSuite/TestSuite.LoadTests/Run.cs | 1 - .../TestSuite.LoadTests.csproj | 10 +- .../Fixtures/ClientFixture.cs | 6 +- .../Fixtures/CreatedAppFixture.cs | 2 +- .../Fixtures/CreatedTeamFixture.cs | 2 +- .../Fixtures/TestSchemaFixtureBase.cs | 2 +- .../TestSchemaWithReferencesFixtureBase.cs | 2 +- .../TestSuite.Shared/TestSuite.Shared.csproj | 20 +- tools/TestSuite/TestSuite.sln | 37 - tools/TestSuite/TestSuite.slnx | 5 + 160 files changed, 6023 insertions(+), 1281 deletions(-) delete mode 100644 backend/Squidex.sln create mode 100644 backend/Squidex.slnx delete mode 100644 backend/extensions/Squidex.Extensions/APM/Zipkin/ZipkinPlugin.cs delete mode 100644 backend/global.json create mode 100644 backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/20260323154443_MigrateToNet10.Designer.cs create mode 100644 backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/20260323154443_MigrateToNet10.cs delete mode 100644 backend/src/Squidex.Data.EntityFramework/Providers/MySql/Content/JsonFunction.cs create mode 100644 backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/20260323155026_MigrateToNet10.Designer.cs create mode 100644 backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/20260323155026_MigrateToNet10.cs create mode 100644 backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/20260323155035_MigrateToNet10.Designer.cs create mode 100644 backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/20260323155035_MigrateToNet10.cs rename backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/{AssetItemClassMap.cs => MongoAssetItemClassMap.cs} (79%) create mode 100644 backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/MongoTextStateClassMap.cs create mode 100644 backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/History/MongoHistoryClassMap.cs rename backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/{AppEntityClassMap.cs => MongoAppEntityClassMap.cs} (82%) rename backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/{EntityClassMap.cs => MongoEntityClassMap.cs} (90%) create mode 100644 backend/src/Squidex.Data.MongoDb/Domain/Users/IdentityUserForwardingSerializer.cs create mode 100644 backend/src/Squidex.Data.MongoDb/Domain/Users/MongoIdentityClassMap.cs delete mode 100644 backend/src/Squidex.Data.MongoDb/Infrastructure/MongoClientFactory.cs create mode 100644 backend/src/Squidex.Data.MongoDb/MongoClientFactory.cs create mode 100644 backend/tests/Squidex.Data.Tests/MongoDb/TestHelpers/MongoSerializerFixture.cs rename backend/tests/Squidex.Domain.Apps.Entities.Tests/Billing/{UsageNotifierWorkerTest.cs => UsageNotifierWorkerTests.cs} (98%) delete mode 100644 tools/TestSuite/TestSuite.sln create mode 100644 tools/TestSuite/TestSuite.slnx diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index ae4375fe3..b87fe186c 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -40,7 +40,7 @@ jobs: id: dotnet uses: actions/setup-dotnet@v4.3.1 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x # Note: Unless a concrete version is specified in the `global.json` file, # the latest .NET version installed on the runner (including preinstalled @@ -52,7 +52,7 @@ jobs: echo '{"sdk":{"version": "${{ steps.dotnet.outputs.dotnet-version }}"}}' > ./global.json - name: Test - TestContainers - run: dotnet test backend/Squidex.sln --filter Category=TestContainer + run: dotnet test backend/Squidex.slnx --filter Category=TestContainer test-mongo: runs-on: ubuntu-latest @@ -67,7 +67,7 @@ jobs: - name: Prepare - Setup dotnet uses: actions/setup-dotnet@v4.3.1 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Prepare - Setup Node uses: actions/setup-node@v4.4.0 @@ -175,7 +175,7 @@ jobs: - name: Prepare - Setup dotnet uses: actions/setup-dotnet@v4.3.1 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Prepare - Setup Node uses: actions/setup-node@v4.4.0 diff --git a/Dockerfile b/Dockerfile index 9e9b964ae..f5634edcd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # Stage 1, Build Backend # -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS backend +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS backend # FFMPEG for tests RUN apt-get update \ @@ -17,7 +17,7 @@ WORKDIR /source # Copy nuget project files. COPY backend/Directory.Build.props ./ -COPY backend/*.sln ./ +COPY backend/*.slnx ./ # Copy the main source project files COPY backend/src/*/*.csproj ./ @@ -79,7 +79,7 @@ RUN cp -a build /build/ # # Stage 3, Build runtime # -FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim +FROM mcr.microsoft.com/dotnet/aspnet:10.0 ARG SQUIDEX__RUNTIME__VERSION=7.0.0 diff --git a/backend/.editorconfig b/backend/.editorconfig index 07d258271..04394bcaa 100644 --- a/backend/.editorconfig +++ b/backend/.editorconfig @@ -184,4 +184,18 @@ dotnet_diagnostic.SA1623.severity = none dotnet_diagnostic.SYSLIB1045.severity = none # xUnit1033: Test classes decorated with 'Xunit.IClassFixture' or 'Xunit.ICollectionFixture' should add a constructor argument of type TFixture -dotnet_diagnostic.xUnit1033.severity = none \ No newline at end of file +dotnet_diagnostic.xUnit1033.severity = none + +[*Tests*.cs] +# MA0040: Forward the CancellationToken parameter to methods that take one +dotnet_diagnostic.MA0040.severity = none + +# xUnit1051: Calls to methods which accept CancellationToken should use TestContext.Current.CancellationToken +dotnet_diagnostic.xUnit1051.severity = none + +# CA1816: Dispose methods should call SuppressFinalize +dotnet_diagnostic.CA1816.severity = none + +[*Fixture.cs] +# CA1816: Dispose methods should call SuppressFinalize +dotnet_diagnostic.CA1816.severity = none \ No newline at end of file diff --git a/backend/Squidex.sln b/backend/Squidex.sln deleted file mode 100644 index 8cd4e51bb..000000000 --- a/backend/Squidex.sln +++ /dev/null @@ -1,321 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex", "src\Squidex\Squidex.csproj", "{61F6BBCE-A080-4400-B194-70E2F5D2096E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "infrastructure", "infrastructure", "{8CF53B92-5EB1-461D-98F8-70DA9B603FBF}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "domain", "domain", "{4C6B06C2-6D77-4E0E-AE32-D7050236433A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Infrastructure", "src\Squidex.Infrastructure\Squidex.Infrastructure.csproj", "{BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Apps.Events", "src\Squidex.Domain.Apps.Events\Squidex.Domain.Apps.Events.csproj", "{25F66C64-058A-4D44-BC0C-F12A054F9A91}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Infrastructure.Tests", "tests\Squidex.Infrastructure.Tests\Squidex.Infrastructure.Tests.csproj", "{7FD0A92B-7862-4BB1-932B-B52A9CACB56B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Apps.Core.Tests", "tests\Squidex.Domain.Apps.Core.Tests\Squidex.Domain.Apps.Core.Tests.csproj", "{FD0AFD44-7A93-4F9E-B5ED-72582392E435}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{94207AA6-4923-4183-A558-E0F8196B8CA3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Shared", "src\Squidex.Shared\Squidex.Shared.csproj", "{5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Users", "src\Squidex.Domain.Users\Squidex.Domain.Users.csproj", "{F7771E22-47BD-45C4-A133-FD7F1DE27CA0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Users.Tests", "tests\Squidex.Domain.Users.Tests\Squidex.Domain.Users.Tests.csproj", "{42184546-E3CB-4D4F-9495-43979B9C63B9}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{360C300D-0F7E-439D-A437-714C959E3CAD}" - ProjectSection(SolutionItems) = preProject - Squidex.ruleset = Squidex.ruleset - stylecop.json = stylecop.json - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Apps.Core.Model", "src\Squidex.Domain.Apps.Core.Model\Squidex.Domain.Apps.Core.Model.csproj", "{F0A83301-50A5-40EA-A1A2-07C7858F5A3F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Apps.Core.Operations", "src\Squidex.Domain.Apps.Core.Operations\Squidex.Domain.Apps.Core.Operations.csproj", "{6B3F75B6-5888-468E-BA4F-4FC725DAEF31}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Apps.Entities", "src\Squidex.Domain.Apps.Entities\Squidex.Domain.Apps.Entities.csproj", "{79FEF326-CA5E-4698-B2BA-C16A4580B4D5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Apps.Entities.Tests", "tests\Squidex.Domain.Apps.Entities.Tests\Squidex.Domain.Apps.Entities.Tests.csproj", "{AA003372-CD8D-4DBC-962C-F61E0C93CF05}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Web.Tests", "tests\Squidex.Web.Tests\Squidex.Web.Tests.csproj", "{7E8CC864-4C6E-496F-A672-9F9AD8874835}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "extensions", "extensions", "{FB8BC3A2-2010-4C3C-A87D-D4A98C05EE52}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Extensions", "extensions\Squidex.Extensions\Squidex.Extensions.csproj", "{F3C41B82-6A67-409A-B7FE-54543EE4F38B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{7EDE8CF1-B1E4-4005-B154-834B944E0D7A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Web", "src\Squidex.Web\Squidex.Web.csproj", "{5B2D251F-46E3-486A-AE16-E3FE06B559ED}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migrations", "src\Migrations\Migrations.csproj", "{23615A39-F3FB-4575-A91C-535899DFB636}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "data", "data", "{3378B841-53F8-48CC-87C1-1B30CF912BFD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Data.MongoDb", "src\Squidex.Data.MongoDb\Squidex.Data.MongoDb.csproj", "{F754F05E-02FF-47B2-AB46-BB05C7E6B29D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Data.Tests", "tests\Squidex.Data.Tests\Squidex.Data.Tests.csproj", "{AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Data.EntityFramework", "src\Squidex.Data.EntityFramework\Squidex.Data.EntityFramework.csproj", "{0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Squidex.Data.Tests.CodeGenerator", "tests\Squidex.Data.Tests.CodeGenerator\Squidex.Data.Tests.CodeGenerator.csproj", "{2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {61F6BBCE-A080-4400-B194-70E2F5D2096E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {61F6BBCE-A080-4400-B194-70E2F5D2096E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {61F6BBCE-A080-4400-B194-70E2F5D2096E}.Debug|x64.ActiveCfg = Debug|Any CPU - {61F6BBCE-A080-4400-B194-70E2F5D2096E}.Debug|x86.ActiveCfg = Debug|Any CPU - {61F6BBCE-A080-4400-B194-70E2F5D2096E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {61F6BBCE-A080-4400-B194-70E2F5D2096E}.Release|Any CPU.Build.0 = Release|Any CPU - {61F6BBCE-A080-4400-B194-70E2F5D2096E}.Release|x64.ActiveCfg = Release|Any CPU - {61F6BBCE-A080-4400-B194-70E2F5D2096E}.Release|x86.ActiveCfg = Release|Any CPU - {BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C}.Debug|x64.ActiveCfg = Debug|Any CPU - {BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C}.Debug|x86.ActiveCfg = Debug|Any CPU - {BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C}.Release|Any CPU.Build.0 = Release|Any CPU - {BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C}.Release|x64.ActiveCfg = Release|Any CPU - {BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C}.Release|x86.ActiveCfg = Release|Any CPU - {25F66C64-058A-4D44-BC0C-F12A054F9A91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {25F66C64-058A-4D44-BC0C-F12A054F9A91}.Debug|Any CPU.Build.0 = Debug|Any CPU - {25F66C64-058A-4D44-BC0C-F12A054F9A91}.Debug|x64.ActiveCfg = Debug|Any CPU - {25F66C64-058A-4D44-BC0C-F12A054F9A91}.Debug|x86.ActiveCfg = Debug|Any CPU - {25F66C64-058A-4D44-BC0C-F12A054F9A91}.Release|Any CPU.ActiveCfg = Release|Any CPU - {25F66C64-058A-4D44-BC0C-F12A054F9A91}.Release|Any CPU.Build.0 = Release|Any CPU - {25F66C64-058A-4D44-BC0C-F12A054F9A91}.Release|x64.ActiveCfg = Release|Any CPU - {25F66C64-058A-4D44-BC0C-F12A054F9A91}.Release|x86.ActiveCfg = Release|Any CPU - {7FD0A92B-7862-4BB1-932B-B52A9CACB56B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7FD0A92B-7862-4BB1-932B-B52A9CACB56B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7FD0A92B-7862-4BB1-932B-B52A9CACB56B}.Debug|x64.ActiveCfg = Debug|Any CPU - {7FD0A92B-7862-4BB1-932B-B52A9CACB56B}.Debug|x86.ActiveCfg = Debug|Any CPU - {7FD0A92B-7862-4BB1-932B-B52A9CACB56B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7FD0A92B-7862-4BB1-932B-B52A9CACB56B}.Release|Any CPU.Build.0 = Release|Any CPU - {7FD0A92B-7862-4BB1-932B-B52A9CACB56B}.Release|x64.ActiveCfg = Release|Any CPU - {7FD0A92B-7862-4BB1-932B-B52A9CACB56B}.Release|x86.ActiveCfg = Release|Any CPU - {FD0AFD44-7A93-4F9E-B5ED-72582392E435}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FD0AFD44-7A93-4F9E-B5ED-72582392E435}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FD0AFD44-7A93-4F9E-B5ED-72582392E435}.Debug|x64.ActiveCfg = Debug|Any CPU - {FD0AFD44-7A93-4F9E-B5ED-72582392E435}.Debug|x86.ActiveCfg = Debug|Any CPU - {FD0AFD44-7A93-4F9E-B5ED-72582392E435}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FD0AFD44-7A93-4F9E-B5ED-72582392E435}.Release|Any CPU.Build.0 = Release|Any CPU - {FD0AFD44-7A93-4F9E-B5ED-72582392E435}.Release|x64.ActiveCfg = Release|Any CPU - {FD0AFD44-7A93-4F9E-B5ED-72582392E435}.Release|x86.ActiveCfg = Release|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Debug|x64.ActiveCfg = Debug|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Debug|x64.Build.0 = Debug|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Debug|x86.ActiveCfg = Debug|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Debug|x86.Build.0 = Debug|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Release|Any CPU.Build.0 = Release|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Release|x64.ActiveCfg = Release|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Release|x64.Build.0 = Release|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Release|x86.ActiveCfg = Release|Any CPU - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}.Release|x86.Build.0 = Release|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Debug|x64.ActiveCfg = Debug|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Debug|x64.Build.0 = Debug|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Debug|x86.ActiveCfg = Debug|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Debug|x86.Build.0 = Debug|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Release|Any CPU.Build.0 = Release|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Release|x64.ActiveCfg = Release|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Release|x64.Build.0 = Release|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Release|x86.ActiveCfg = Release|Any CPU - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Release|x86.Build.0 = Release|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Debug|x64.ActiveCfg = Debug|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Debug|x64.Build.0 = Debug|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Debug|x86.ActiveCfg = Debug|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Debug|x86.Build.0 = Debug|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Release|Any CPU.Build.0 = Release|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Release|x64.ActiveCfg = Release|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Release|x64.Build.0 = Release|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Release|x86.ActiveCfg = Release|Any CPU - {42184546-E3CB-4D4F-9495-43979B9C63B9}.Release|x86.Build.0 = Release|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Debug|x64.ActiveCfg = Debug|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Debug|x64.Build.0 = Debug|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Debug|x86.ActiveCfg = Debug|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Debug|x86.Build.0 = Debug|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Release|Any CPU.Build.0 = Release|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Release|x64.ActiveCfg = Release|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Release|x64.Build.0 = Release|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Release|x86.ActiveCfg = Release|Any CPU - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F}.Release|x86.Build.0 = Release|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Debug|x64.ActiveCfg = Debug|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Debug|x64.Build.0 = Debug|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Debug|x86.ActiveCfg = Debug|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Debug|x86.Build.0 = Debug|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Release|Any CPU.Build.0 = Release|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Release|x64.ActiveCfg = Release|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Release|x64.Build.0 = Release|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Release|x86.ActiveCfg = Release|Any CPU - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31}.Release|x86.Build.0 = Release|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Debug|x64.ActiveCfg = Debug|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Debug|x64.Build.0 = Debug|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Debug|x86.ActiveCfg = Debug|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Debug|x86.Build.0 = Debug|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Release|Any CPU.Build.0 = Release|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Release|x64.ActiveCfg = Release|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Release|x64.Build.0 = Release|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Release|x86.ActiveCfg = Release|Any CPU - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5}.Release|x86.Build.0 = Release|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Debug|x64.ActiveCfg = Debug|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Debug|x64.Build.0 = Debug|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Debug|x86.ActiveCfg = Debug|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Debug|x86.Build.0 = Debug|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Release|Any CPU.Build.0 = Release|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Release|x64.ActiveCfg = Release|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Release|x64.Build.0 = Release|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Release|x86.ActiveCfg = Release|Any CPU - {AA003372-CD8D-4DBC-962C-F61E0C93CF05}.Release|x86.Build.0 = Release|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Debug|x64.ActiveCfg = Debug|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Debug|x64.Build.0 = Debug|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Debug|x86.ActiveCfg = Debug|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Debug|x86.Build.0 = Debug|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Release|Any CPU.Build.0 = Release|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Release|x64.ActiveCfg = Release|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Release|x64.Build.0 = Release|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Release|x86.ActiveCfg = Release|Any CPU - {7E8CC864-4C6E-496F-A672-9F9AD8874835}.Release|x86.Build.0 = Release|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Debug|x64.ActiveCfg = Debug|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Debug|x64.Build.0 = Debug|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Debug|x86.ActiveCfg = Debug|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Debug|x86.Build.0 = Debug|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|Any CPU.Build.0 = Release|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|x64.ActiveCfg = Release|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|x64.Build.0 = Release|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|x86.ActiveCfg = Release|Any CPU - {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|x86.Build.0 = Release|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|x64.ActiveCfg = Debug|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|x64.Build.0 = Debug|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|x86.ActiveCfg = Debug|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|x86.Build.0 = Debug|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|Any CPU.Build.0 = Release|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|x64.ActiveCfg = Release|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|x64.Build.0 = Release|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|x86.ActiveCfg = Release|Any CPU - {5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|x86.Build.0 = Release|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Debug|Any CPU.Build.0 = Debug|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Debug|x64.ActiveCfg = Debug|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Debug|x64.Build.0 = Debug|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Debug|x86.ActiveCfg = Debug|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Debug|x86.Build.0 = Debug|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Release|Any CPU.ActiveCfg = Release|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Release|Any CPU.Build.0 = Release|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Release|x64.ActiveCfg = Release|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Release|x64.Build.0 = Release|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Release|x86.ActiveCfg = Release|Any CPU - {23615A39-F3FB-4575-A91C-535899DFB636}.Release|x86.Build.0 = Release|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Debug|x64.ActiveCfg = Debug|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Debug|x64.Build.0 = Debug|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Debug|x86.ActiveCfg = Debug|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Debug|x86.Build.0 = Debug|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Release|Any CPU.Build.0 = Release|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Release|x64.ActiveCfg = Release|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Release|x64.Build.0 = Release|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Release|x86.ActiveCfg = Release|Any CPU - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D}.Release|x86.Build.0 = Release|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Debug|x64.ActiveCfg = Debug|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Debug|x64.Build.0 = Debug|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Debug|x86.ActiveCfg = Debug|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Debug|x86.Build.0 = Debug|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Release|Any CPU.Build.0 = Release|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Release|x64.ActiveCfg = Release|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Release|x64.Build.0 = Release|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Release|x86.ActiveCfg = Release|Any CPU - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}.Release|x86.Build.0 = Release|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Debug|x64.ActiveCfg = Debug|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Debug|x64.Build.0 = Debug|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Debug|x86.ActiveCfg = Debug|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Debug|x86.Build.0 = Debug|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Release|Any CPU.Build.0 = Release|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Release|x64.ActiveCfg = Release|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Release|x64.Build.0 = Release|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Release|x86.ActiveCfg = Release|Any CPU - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA}.Release|x86.Build.0 = Release|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|x64.ActiveCfg = Debug|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|x64.Build.0 = Debug|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|x86.ActiveCfg = Debug|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Debug|x86.Build.0 = Debug|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|Any CPU.Build.0 = Release|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|x64.ActiveCfg = Release|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|x64.Build.0 = Release|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|x86.ActiveCfg = Release|Any CPU - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF} - {25F66C64-058A-4D44-BC0C-F12A054F9A91} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A} - {7FD0A92B-7862-4BB1-932B-B52A9CACB56B} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF} - {FD0AFD44-7A93-4F9E-B5ED-72582392E435} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A} - {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A} - {F7771E22-47BD-45C4-A133-FD7F1DE27CA0} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A} - {42184546-E3CB-4D4F-9495-43979B9C63B9} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A} - {F0A83301-50A5-40EA-A1A2-07C7858F5A3F} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A} - {6B3F75B6-5888-468E-BA4F-4FC725DAEF31} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A} - {79FEF326-CA5E-4698-B2BA-C16A4580B4D5} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A} - {AA003372-CD8D-4DBC-962C-F61E0C93CF05} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A} - {7E8CC864-4C6E-496F-A672-9F9AD8874835} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A} - {F3C41B82-6A67-409A-B7FE-54543EE4F38B} = {FB8BC3A2-2010-4C3C-A87D-D4A98C05EE52} - {5B2D251F-46E3-486A-AE16-E3FE06B559ED} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A} - {23615A39-F3FB-4575-A91C-535899DFB636} = {94207AA6-4923-4183-A558-E0F8196B8CA3} - {F754F05E-02FF-47B2-AB46-BB05C7E6B29D} = {3378B841-53F8-48CC-87C1-1B30CF912BFD} - {AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD} = {3378B841-53F8-48CC-87C1-1B30CF912BFD} - {0348CFDA-4DA1-4DB5-9C6F-0D234FE3E4DA} = {3378B841-53F8-48CC-87C1-1B30CF912BFD} - {2E4CC21D-3AB9-4B8C-A13E-348AA3E2F328} = {3378B841-53F8-48CC-87C1-1B30CF912BFD} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {02F2E872-3141-44F5-BD6A-33CD84E9FE08} - EndGlobalSection -EndGlobal diff --git a/backend/Squidex.slnx b/backend/Squidex.slnx new file mode 100644 index 000000000..6b6d7673f --- /dev/null +++ b/backend/Squidex.slnx @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/extensions/Squidex.Extensions/APM/Zipkin/ZipkinPlugin.cs b/backend/extensions/Squidex.Extensions/APM/Zipkin/ZipkinPlugin.cs deleted file mode 100644 index a63fce9d4..000000000 --- a/backend/extensions/Squidex.Extensions/APM/Zipkin/ZipkinPlugin.cs +++ /dev/null @@ -1,37 +0,0 @@ -// ========================================================================== -// Squidex Headless CMS -// ========================================================================== -// Copyright (c) Squidex UG (haftungsbeschraenkt) -// All rights reserved. Licensed under the MIT license. -// ========================================================================== - -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using OpenTelemetry.Trace; -using Squidex.Infrastructure; -using Squidex.Infrastructure.Plugins; - -namespace Squidex.Extensions.APM.Zipkin; - -public sealed class ZipkinPlugin : IPlugin -{ - private sealed class Configurator(IConfiguration config) : ITelemetryConfigurator - { - public void Configure(TracerProviderBuilder builder) - { - builder.AddZipkinExporter(options => - { - config.GetSection("logging:zipkin").Bind(options); - }); - } - } - - public void ConfigureServices(IServiceCollection services, IConfiguration config) - { - if (config.GetValue("logging:zipkin:enabled")) - { - services.AddSingleton(); - } - } -} diff --git a/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaProducer.cs b/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaProducer.cs index 53f285ffd..db06c90a9 100644 --- a/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaProducer.cs +++ b/backend/extensions/Squidex.Extensions/Actions/Kafka/KafkaProducer.cs @@ -96,7 +96,10 @@ public sealed class KafkaProducer break; } - log.Log(level, "Kafka log {name}: {message}.", message.Name, message.Message); + if (log.IsEnabled(level)) + { + log.Log(level, "Kafka log {name}: {message}.", message.Name, message.Message); + } } private static void LogError(ILogger log, Error error) @@ -279,4 +282,4 @@ public sealed class KafkaProducer return schema?.Tag == expected || (schema is UnionSchema union && union.Schemas.Any(x => x.Tag == expected)); } } -#endif \ No newline at end of file +#endif diff --git a/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj b/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj index e97a17f66..8509df10e 100644 --- a/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj +++ b/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj @@ -1,6 +1,6 @@  - net8.0 + net10.0 latest enable enable @@ -11,34 +11,35 @@ - - + + - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - + + + + + + + - - - - + + + + - + diff --git a/backend/global.json b/backend/global.json deleted file mode 100644 index 3d946171e..000000000 --- a/backend/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "sdk": { - "version": "8.0.416" - } -} \ No newline at end of file diff --git a/backend/i18n/translator/Squidex.Translator/Squidex.Translator.csproj b/backend/i18n/translator/Squidex.Translator/Squidex.Translator.csproj index 43902a781..33959f846 100644 --- a/backend/i18n/translator/Squidex.Translator/Squidex.Translator.csproj +++ b/backend/i18n/translator/Squidex.Translator/Squidex.Translator.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 latest enable NU1608 diff --git a/backend/src/Migrations/Migrations.csproj b/backend/src/Migrations/Migrations.csproj index c7811d56b..60f652d6f 100644 --- a/backend/src/Migrations/Migrations.csproj +++ b/backend/src/Migrations/Migrations.csproj @@ -1,16 +1,16 @@ - net8.0 + net10.0 latest enable enable - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Apps/EFAppRepository.cs b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Apps/EFAppRepository.cs index 63b645c49..a2d7415e0 100644 --- a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Apps/EFAppRepository.cs +++ b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Apps/EFAppRepository.cs @@ -5,7 +5,6 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using System.Linq.Expressions; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Squidex.Domain.Apps.Core.Apps; @@ -101,7 +100,7 @@ public sealed class EFAppRepository(IDbContextFactory dbCont return byName.Values.ToList(); } - protected override Expression, SetPropertyCalls>> BuildUpdate(EFAppEntity entity) + protected override Action> BuildUpdate(EFAppEntity entity) { return u => u .SetProperty(x => x.Document, entity.Document) diff --git a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Assets/EFAssetFolderRepository_SnapshotStore.cs b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Assets/EFAssetFolderRepository_SnapshotStore.cs index e4497d621..081e1d6c9 100644 --- a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Assets/EFAssetFolderRepository_SnapshotStore.cs +++ b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Assets/EFAssetFolderRepository_SnapshotStore.cs @@ -113,7 +113,7 @@ public sealed partial class EFAssetFolderRepository : ISnapshotStore, SetPropertyCalls>> BuildUpdate(EFAssetFolderEntity entity) + private static Action> BuildUpdate(EFAssetFolderEntity entity) { return b => b .SetProperty(x => x.AppId, entity.AppId) diff --git a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Assets/EFAssetRepository_SnapshotStore.cs b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Assets/EFAssetRepository_SnapshotStore.cs index a4f8bf644..8cfb3a954 100644 --- a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Assets/EFAssetRepository_SnapshotStore.cs +++ b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Assets/EFAssetRepository_SnapshotStore.cs @@ -108,7 +108,7 @@ public sealed partial class EFAssetRepository : ISnapshotStore, } } - private static Expression, SetPropertyCalls>> BuildUpdate(EFAssetEntity entity) + private static Action> BuildUpdate(EFAssetEntity entity) { return b => b .SetProperty(x => x.AppId, entity.AppId) diff --git a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Contents/Extensions.cs b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Contents/Extensions.cs index 81eecb311..8d55f9a28 100644 --- a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Contents/Extensions.cs +++ b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Contents/Extensions.cs @@ -54,7 +54,7 @@ internal static class Extensions } } - public static Expression, SetPropertyCalls>> BuildUpdate(T entity) where T : EFContentEntity + public static Action> BuildUpdate(T entity) where T : EFContentEntity { return b => b .SetProperty(x => x.AppId, entity.AppId) diff --git a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Schemas/EFSchemaRepository.cs b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Schemas/EFSchemaRepository.cs index 5816f2ebf..91d5d6384 100644 --- a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Schemas/EFSchemaRepository.cs +++ b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Schemas/EFSchemaRepository.cs @@ -106,7 +106,7 @@ public sealed class EFSchemaRepository(IDbContextFactory dbC } } - protected override Expression, SetPropertyCalls>> BuildUpdate(EFSchemaEntity entity) + protected override Action> BuildUpdate(EFSchemaEntity entity) { return u => u .SetProperty(x => x.Document, entity.Document) diff --git a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Teams/EFTeamRepository.cs b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Teams/EFTeamRepository.cs index b81ec97ff..7a375a814 100644 --- a/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Teams/EFTeamRepository.cs +++ b/backend/src/Squidex.Data.EntityFramework/Domain/Apps/Entities/Teams/EFTeamRepository.cs @@ -70,7 +70,7 @@ public sealed class EFTeamRepository(IDbContextFactory dbCon } } - protected override Expression, SetPropertyCalls>> BuildUpdate(EFTeamEntity entity) + protected override Action> BuildUpdate(EFTeamEntity entity) { return u => u .SetProperty(x => x.Document, entity.Document) diff --git a/backend/src/Squidex.Data.EntityFramework/Infrastructure/BulkInserter.cs b/backend/src/Squidex.Data.EntityFramework/Infrastructure/BulkInserter.cs index c8955a71e..826616ff0 100644 --- a/backend/src/Squidex.Data.EntityFramework/Infrastructure/BulkInserter.cs +++ b/backend/src/Squidex.Data.EntityFramework/Infrastructure/BulkInserter.cs @@ -24,6 +24,6 @@ public sealed class BulkInserter : IDbFlowsBulkInserter, IDbEventStoreBulkInsert public Task BulkUpsertAsync(DbContext dbContext, IEnumerable entities, CancellationToken ct = default) where T : class { - return dbContext.ExecuteBulkInsertAsync(entities, o => { }, new OnConflictOptions { Update = e => e }, ct); + return dbContext.ExecuteBulkInsertAsync(entities, o => { }, new OnConflictOptions { Update = (lhs, rhs) => lhs }, ct); } } diff --git a/backend/src/Squidex.Data.EntityFramework/Infrastructure/Extensions.cs b/backend/src/Squidex.Data.EntityFramework/Infrastructure/Extensions.cs index b21a9dfba..dd48c19b6 100644 --- a/backend/src/Squidex.Data.EntityFramework/Infrastructure/Extensions.cs +++ b/backend/src/Squidex.Data.EntityFramework/Infrastructure/Extensions.cs @@ -93,7 +93,7 @@ public static class Extensions return Task.CompletedTask; } - return dbContext.ExecuteBulkInsertAsync(source, o => { }, new OnConflictOptions { Update = e => e }, ct); + return dbContext.ExecuteBulkInsertAsync(source, o => { }, new OnConflictOptions { Update = (lhs, rhs) => lhs }, ct); } public static Task BulkInsertAsync(this DbContext dbContext, List source, @@ -173,7 +173,7 @@ public static class Extensions } public static async Task UpsertAsync(this DbContext dbContext, T entity, long oldVersion, - Func, SetPropertyCalls>>> update, + Func>> update, CancellationToken ct) where T : class, IVersionedEntity { var dbSet = dbContext.Set(); diff --git a/backend/src/Squidex.Data.EntityFramework/Infrastructure/States/EFSnapshotStore.cs b/backend/src/Squidex.Data.EntityFramework/Infrastructure/States/EFSnapshotStore.cs index 3e74d3867..704f03ed8 100644 --- a/backend/src/Squidex.Data.EntityFramework/Infrastructure/States/EFSnapshotStore.cs +++ b/backend/src/Squidex.Data.EntityFramework/Infrastructure/States/EFSnapshotStore.cs @@ -114,7 +114,7 @@ public class EFSnapshotStore(IDbContextFactory db return dbContextFactory.CreateDbContextAsync(ct); } - protected virtual Expression, SetPropertyCalls>> BuildUpdate(TState entity) + protected virtual Action> BuildUpdate(TState entity) { return u => u .SetProperty(x => x.Document, entity.Document) diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/20260323154443_MigrateToNet10.Designer.cs b/backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/20260323154443_MigrateToNet10.Designer.cs new file mode 100644 index 000000000..23b229988 --- /dev/null +++ b/backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/20260323154443_MigrateToNet10.Designer.cs @@ -0,0 +1,1628 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using NetTopologySuite.Geometries; +using Squidex.Providers.MySql.App; + +#nullable disable + +namespace Squidex.Providers.MySql.App.Migrations +{ + [DbContext(typeof(MySqlAppDbContext))] + [Migration("20260323154443_MigrateToNet10")] + partial class MigrateToNet10 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("longtext"); + + b.Property("PhoneNumber") + .HasColumnType("longtext"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("SecurityStamp") + .HasColumnType("longtext"); + + b.Property("TwoFactorEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); + + b.Property("ProviderKey") + .HasColumnType("varchar(255)"); + + b.Property("ProviderDisplayName") + .HasColumnType("longtext"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.Property("RoleId") + .HasColumnType("varchar(255)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("varchar(255)"); + + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); + + b.Property("Name") + .HasColumnType("varchar(255)"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("varchar(255)"); + + b.Property("ApplicationId") + .HasColumnType("varchar(255)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("varchar(255)"); + + b.Property("ApplicationId") + .HasColumnType("varchar(255)"); + + b.Property("AuthorizationId") + .HasColumnType("varchar(255)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId") + .IsUnique(); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Squidex.AI.EntityFramework.EFChatEntity", b => + { + b.Property("Id") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("LastUpdated") + .HasColumnType("datetime(6)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("LastUpdated"); + + b.ToTable("Chats", (string)null); + }); + + modelBuilder.Entity("Squidex.Assets.EntityFramework.EFAssetKeyValueEntity", b => + { + b.Property("Key") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Expires") + .HasColumnType("datetime(6)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Key"); + + b.HasIndex("Expires"); + + b.ToTable("AssetKeyValueStore_TusMetadata", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Apps.EFAppEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("IndexedCreated") + .HasColumnType("datetime(6)") + .HasColumnName("Created"); + + b.Property("IndexedDeleted") + .HasColumnType("tinyint(1)") + .HasColumnName("Deleted"); + + b.Property("IndexedName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Name"); + + b.Property("IndexedTeamId") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("TeamId"); + + b.Property("IndexedUserIds") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("UserIds"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_App", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Assets.EFAssetEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("FileHash") + .HasColumnType("longtext"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileVersion") + .HasColumnType("bigint"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsProtected") + .HasColumnType("tinyint(1)"); + + b.Property("LastModified") + .HasColumnType("datetime(6)"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Metadata") + .IsRequired() + .HasColumnType("json"); + + b.Property("MimeType") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ParentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Slug") + .HasColumnType("longtext"); + + b.Property("Tags") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("TotalSize") + .HasColumnType("bigint"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.HasIndex("IndexedAppId", "Id"); + + b.ToTable("Assets"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Assets.EFAssetFolderEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("FolderName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("LastModified") + .HasColumnType("datetime(6)"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ParentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.HasIndex("IndexedAppId", "Id"); + + b.ToTable("AssetFolders"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFContentCompleteEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("json"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IndexedSchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("LastModified") + .HasColumnType("datetime(6)"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("NewData") + .HasColumnType("json"); + + b.Property("NewStatus") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ScheduleJob") + .HasColumnType("json"); + + b.Property("ScheduledAt") + .HasColumnType("datetime(6)"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("TranslationStatus") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("ContentsAll", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFContentPublishedEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("json"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IndexedSchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("LastModified") + .HasColumnType("datetime(6)"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("NewData") + .HasColumnType("json"); + + b.Property("NewStatus") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ScheduleJob") + .HasColumnType("json"); + + b.Property("ScheduledAt") + .HasColumnType("datetime(6)"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("TranslationStatus") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("ContentsPublished", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFContentTableEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("AppId", "SchemaId") + .IsUnique(); + + b.ToTable("ContentTables", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFReferenceCompleteEntity", b => + { + b.Property("AppId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("FromKey") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ToId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("FromSchema") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasDefaultValue("00000000-0000-0000-0000-000000000000"); + + b.HasKey("AppId", "FromKey", "ToId"); + + b.ToTable("ContentReferencesAll", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFReferencePublishedEntity", b => + { + b.Property("AppId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("FromKey") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ToId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("FromSchema") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasDefaultValue("00000000-0000-0000-0000-000000000000"); + + b.HasKey("AppId", "FromKey", "ToId"); + + b.ToTable("ContentReferencesPublished", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.EFTextIndexGeoEntity", b => + { + b.Property("Id") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("GeoField") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("GeoObject") + .IsRequired() + .HasColumnType("geometry"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ServeAll") + .HasColumnType("tinyint(1)"); + + b.Property("ServePublished") + .HasColumnType("tinyint(1)"); + + b.Property("Stage") + .HasColumnType("tinyint unsigned"); + + b.HasKey("Id"); + + b.ToTable("Geos"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.EFTextIndexTextEntity", b => + { + b.Property("Id") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ServeAll") + .HasColumnType("tinyint(1)"); + + b.Property("ServePublished") + .HasColumnType("tinyint(1)"); + + b.Property("Stage") + .HasColumnType("tinyint unsigned"); + + b.Property("Texts") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.ToTable("Texts"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.EFTextIndexUserInfoEntity", b => + { + b.Property("Id") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ServeAll") + .HasColumnType("tinyint(1)"); + + b.Property("ServePublished") + .HasColumnType("tinyint(1)"); + + b.Property("Stage") + .HasColumnType("tinyint unsigned"); + + b.Property("UserInfoApiKey") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("UserInfoRole") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("UserInfoApiKey"); + + b.ToTable("UserInfos"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.State.TextContentState", b => + { + b.Property("UniqueContentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("State") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("UniqueContentId"); + + b.ToTable("TextState", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.History.HistoryEvent", b => + { + b.Property("Id") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Actor") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Channel") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("EventType") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OwnerId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Parameters") + .IsRequired() + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("HistoryEvent"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Rules.EFRuleEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("AppId"); + + b.Property("IndexedDeleted") + .HasColumnType("tinyint(1)") + .HasColumnName("Deleted"); + + b.Property("IndexedId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Id"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Rule", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Schemas.EFSchemaEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("AppId"); + + b.Property("IndexedDeleted") + .HasColumnType("tinyint(1)") + .HasColumnName("Deleted"); + + b.Property("IndexedId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Id"); + + b.Property("IndexedName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Name"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Schema", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Teams.EFTeamEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("IndexedAuthDomain") + .HasColumnType("longtext") + .HasColumnName("AuthDomain"); + + b.Property("IndexedDeleted") + .HasColumnType("tinyint(1)") + .HasColumnName("Deleted"); + + b.Property("IndexedUserIds") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("UserIds"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Team", (string)null); + }); + + modelBuilder.Entity("Squidex.Events.EntityFramework.EFEventCommit", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("EventStream") + .IsRequired() + .HasMaxLength(750) + .HasColumnType("varchar(750)"); + + b.Property("EventStreamOffset") + .HasColumnType("bigint"); + + b.PrimitiveCollection("Events") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("EventsCount") + .HasColumnType("bigint"); + + b.Property("Position") + .HasColumnType("bigint"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("EventStream", "EventStreamOffset") + .IsUnique(); + + b.HasIndex("EventStream", "Position"); + + b.HasIndex("EventStream", "Timestamp"); + + b.ToTable("Events"); + }); + + modelBuilder.Entity("Squidex.Events.EntityFramework.EFPosition", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("Position") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("EventPosition"); + }); + + modelBuilder.Entity("Squidex.Flows.EntityFramework.EFCronJobEntity", b => + { + b.Property("Id") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueTime") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("DueTime"); + + b.ToTable("CronJobs", (string)null); + }); + + modelBuilder.Entity("Squidex.Flows.EntityFramework.EFFlowStateEntity", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("DefinitionId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DueTime") + .HasColumnType("datetime(6)"); + + b.Property("OwnerId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("SchedulePartition") + .HasColumnType("int"); + + b.Property("State") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("DueTime", "SchedulePartition"); + + b.ToTable("Flows", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.Caching.EFCacheEntity", b => + { + b.Property("Key") + .HasColumnType("varchar(255)"); + + b.Property("Expires") + .HasColumnType("datetime(6)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("longblob"); + + b.HasKey("Key"); + + b.ToTable("Cache", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.Log.EFRequestEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Key") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Properties") + .IsRequired() + .HasColumnType("json"); + + b.Property("Timestamp") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Key"); + + b.ToTable("Requests", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.Migrations.EFMigrationEntity", b => + { + b.Property("Id") + .HasColumnType("int"); + + b.Property("IsLocked") + .HasColumnType("tinyint(1)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Migrations", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_UISettings", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Index_TagHistory", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_UsageNotifications", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Counters", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_JobsState", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_UsageTracker", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Index_Tags", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Identity_Keys", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Identity_Xml", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_EventConsumerState", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Document") + .HasColumnType("json"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Names", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.UsageTracking.EFUsageCounterEntity", b => + { + b.Property("Key") + .HasColumnType("varchar(255)"); + + b.Property("Date") + .HasColumnType("datetime(6)"); + + b.Property("Category") + .HasColumnType("varchar(255)"); + + b.Property("CounterKey") + .HasColumnType("varchar(255)"); + + b.Property("CounterValue") + .HasColumnType("double"); + + b.HasKey("Key", "Date", "Category", "CounterKey"); + + b.ToTable("Counter", (string)null); + }); + + modelBuilder.Entity("Squidex.Messaging.EntityFramework.EFMessage", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("ChannelName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("MessageData") + .IsRequired() + .HasColumnType("longblob"); + + b.Property("MessageHeaders") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("QueueName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("TimeHandled") + .HasColumnType("datetime(6)"); + + b.Property("TimeToLive") + .HasColumnType("datetime(6)"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ChannelName", "TimeHandled"); + + b.ToTable("Messages", (string)null); + }); + + modelBuilder.Entity("Squidex.Messaging.EntityFramework.EFMessagingDataEntity", b => + { + b.Property("Group") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Key") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Expiration") + .HasColumnType("datetime(6)"); + + b.Property("ValueData") + .IsRequired() + .HasColumnType("longblob"); + + b.Property("ValueFormat") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ValueType") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.HasKey("Group", "Key"); + + b.HasIndex("Expiration"); + + b.ToTable("MessagingData", (string)null); + }); + + modelBuilder.Entity("YDotNet.Server.EntityFramework.YDotNetDocument", b => + { + b.Property("Id") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("longblob"); + + b.Property("Expiration") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.ToTable("YDotNetDocument", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreToken", b => + { + b.HasOne("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreAuthorization", "Authorization") + .WithMany("Tokens") + .HasForeignKey("AuthorizationId"); + + b.Navigation("Authorization"); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Navigation("Tokens"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/20260323154443_MigrateToNet10.cs b/backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/20260323154443_MigrateToNet10.cs new file mode 100644 index 000000000..455089b6b --- /dev/null +++ b/backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/20260323154443_MigrateToNet10.cs @@ -0,0 +1,46 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Squidex.Providers.MySql.App.Migrations +{ + /// + public partial class MigrateToNet10 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "ApplicationId", + table: "OpenIddictAuthorizations", + type: "varchar(255)", + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(255)") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "OpenIddictAuthorizations", + keyColumn: "ApplicationId", + keyValue: null, + column: "ApplicationId", + value: ""); + + migrationBuilder.AlterColumn( + name: "ApplicationId", + table: "OpenIddictAuthorizations", + type: "varchar(255)", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255)", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/MySqlDbContextModelSnapshot.cs b/backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/MySqlDbContextModelSnapshot.cs index 67a07b809..14b7355f2 100644 --- a/backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/MySqlDbContextModelSnapshot.cs +++ b/backend/src/Squidex.Data.EntityFramework/Providers/MySql/App/Migrations/MySqlDbContextModelSnapshot.cs @@ -18,7 +18,7 @@ namespace Squidex.Providers.MySql.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.16") + .HasAnnotation("ProductVersion", "10.0.5") .HasAnnotation("Relational:MaxIdentifierLength", 64); MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); @@ -226,7 +226,6 @@ namespace Squidex.Providers.MySql.Migrations .HasColumnType("varchar(255)"); b.Property("ApplicationId") - .IsRequired() .HasColumnType("varchar(255)"); b.Property("ConcurrencyToken") @@ -322,7 +321,7 @@ namespace Squidex.Providers.MySql.Migrations b.ToTable("OpenIddictTokens", (string)null); }); - modelBuilder.Entity("Squidex.AI.Mongo.EFChatEntity", b => + modelBuilder.Entity("Squidex.AI.EntityFramework.EFChatEntity", b => { b.Property("Id") .HasMaxLength(255) @@ -1103,7 +1102,7 @@ namespace Squidex.Providers.MySql.Migrations b.Property("EventStreamOffset") .HasColumnType("bigint"); - b.Property("Events") + b.PrimitiveCollection("Events") .IsRequired() .HasColumnType("longtext"); diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/MySql/Content/JsonFunction.cs b/backend/src/Squidex.Data.EntityFramework/Providers/MySql/Content/JsonFunction.cs deleted file mode 100644 index dbaf01ef4..000000000 --- a/backend/src/Squidex.Data.EntityFramework/Providers/MySql/Content/JsonFunction.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Squidex.Providers.MySql.Content; - -public static class JsonFunction -{ -} diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/MySql/JsonFunction.cs b/backend/src/Squidex.Data.EntityFramework/Providers/MySql/JsonFunction.cs index 69f763db6..425d78703 100644 --- a/backend/src/Squidex.Data.EntityFramework/Providers/MySql/JsonFunction.cs +++ b/backend/src/Squidex.Data.EntityFramework/Providers/MySql/JsonFunction.cs @@ -18,7 +18,7 @@ public static class JsonFunction private const int TypeBoolean = 3; private const int TypeNumber = 4; - private static readonly Dictionary<(int Type, CompareOperator Operator), string> Functions = new() + private static readonly Dictionary<(int Type, CompareOperator Operator), string> Functions = new () { [(TypeAny, CompareOperator.Empty)] = "json_empty", [(TypeAny, CompareOperator.Exists)] = "json_exists", diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/20260323155026_MigrateToNet10.Designer.cs b/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/20260323155026_MigrateToNet10.Designer.cs new file mode 100644 index 000000000..158e43183 --- /dev/null +++ b/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/20260323155026_MigrateToNet10.Designer.cs @@ -0,0 +1,1629 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using NetTopologySuite.Geometries; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Squidex.Providers.Postgres.App; + +#nullable disable + +namespace Squidex.Providers.Postgres.App.Migrations +{ + [DbContext(typeof(PostgresAppDbContext))] + [Migration("20260323155026_MigrateToNet10")] + partial class MigrateToNet10 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis"); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("AccessFailedCount") + .HasColumnType("integer"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("boolean"); + + b.Property("LockoutEnabled") + .HasColumnType("boolean"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("PasswordHash") + .HasColumnType("text"); + + b.Property("PhoneNumber") + .HasColumnType("text"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("boolean"); + + b.Property("SecurityStamp") + .HasColumnType("text"); + + b.Property("TwoFactorEnabled") + .HasColumnType("boolean"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("ProviderKey") + .HasColumnType("text"); + + b.Property("ProviderDisplayName") + .HasColumnType("text"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("RoleId") + .HasColumnType("text"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("text"); + + b.Property("ApplicationId") + .HasColumnType("text"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Scopes") + .HasColumnType("text"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("text"); + + b.Property("ApplicationId") + .HasColumnType("text"); + + b.Property("AuthorizationId") + .HasColumnType("text"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Payload") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedemptionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId") + .IsUnique(); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Squidex.AI.EntityFramework.EFChatEntity", b => + { + b.Property("Id") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("LastUpdated") + .HasColumnType("timestamp with time zone"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("LastUpdated"); + + b.ToTable("Chats", (string)null); + }); + + modelBuilder.Entity("Squidex.Assets.EntityFramework.EFAssetKeyValueEntity", b => + { + b.Property("Key") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Expires") + .HasColumnType("timestamp with time zone"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Key"); + + b.HasIndex("Expires"); + + b.ToTable("AssetKeyValueStore_TusMetadata", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Apps.EFAppEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("IndexedCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("Created"); + + b.Property("IndexedDeleted") + .HasColumnType("boolean") + .HasColumnName("Deleted"); + + b.Property("IndexedName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("Name"); + + b.Property("IndexedTeamId") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("TeamId"); + + b.Property("IndexedUserIds") + .IsRequired() + .HasColumnType("text") + .HasColumnName("UserIds"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_App", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Assets.EFAssetEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Created") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("FileHash") + .HasColumnType("text"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("text"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileVersion") + .HasColumnType("bigint"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("IsDeleted") + .HasColumnType("boolean"); + + b.Property("IsProtected") + .HasColumnType("boolean"); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Metadata") + .IsRequired() + .HasColumnType("jsonb"); + + b.Property("MimeType") + .IsRequired() + .HasColumnType("text"); + + b.Property("ParentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Slug") + .HasColumnType("text"); + + b.Property("Tags") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("character varying(1000)"); + + b.Property("TotalSize") + .HasColumnType("bigint"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.HasIndex("IndexedAppId", "Id"); + + b.ToTable("Assets"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Assets.EFAssetFolderEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Created") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("FolderName") + .IsRequired() + .HasColumnType("text"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("IsDeleted") + .HasColumnType("boolean"); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ParentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.HasIndex("IndexedAppId", "Id"); + + b.ToTable("AssetFolders"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFContentCompleteEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Created") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("jsonb"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("IndexedSchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("IsDeleted") + .HasColumnType("boolean"); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("NewData") + .HasColumnType("jsonb"); + + b.Property("NewStatus") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ScheduleJob") + .HasColumnType("jsonb"); + + b.Property("ScheduledAt") + .HasColumnType("timestamp with time zone"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("TranslationStatus") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("ContentsAll", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFContentPublishedEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Created") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("jsonb"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("IndexedSchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("IsDeleted") + .HasColumnType("boolean"); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("NewData") + .HasColumnType("jsonb"); + + b.Property("NewStatus") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ScheduleJob") + .HasColumnType("jsonb"); + + b.Property("ScheduledAt") + .HasColumnType("timestamp with time zone"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("TranslationStatus") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("ContentsPublished", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFContentTableEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.HasKey("Id"); + + b.HasIndex("AppId", "SchemaId") + .IsUnique(); + + b.ToTable("ContentTables", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFReferenceCompleteEntity", b => + { + b.Property("AppId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("FromKey") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ToId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("FromSchema") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasDefaultValue("00000000-0000-0000-0000-000000000000"); + + b.HasKey("AppId", "FromKey", "ToId"); + + b.ToTable("ContentReferencesAll", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFReferencePublishedEntity", b => + { + b.Property("AppId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("FromKey") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ToId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("FromSchema") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasDefaultValue("00000000-0000-0000-0000-000000000000"); + + b.HasKey("AppId", "FromKey", "ToId"); + + b.ToTable("ContentReferencesPublished", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.EFTextIndexGeoEntity", b => + { + b.Property("Id") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("GeoField") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("GeoObject") + .IsRequired() + .HasColumnType("geometry"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ServeAll") + .HasColumnType("boolean"); + + b.Property("ServePublished") + .HasColumnType("boolean"); + + b.Property("Stage") + .HasColumnType("smallint"); + + b.HasKey("Id"); + + b.ToTable("Geos"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.EFTextIndexTextEntity", b => + { + b.Property("Id") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ServeAll") + .HasColumnType("boolean"); + + b.Property("ServePublished") + .HasColumnType("boolean"); + + b.Property("Stage") + .HasColumnType("smallint"); + + b.Property("Texts") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Texts"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.EFTextIndexUserInfoEntity", b => + { + b.Property("Id") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ServeAll") + .HasColumnType("boolean"); + + b.Property("ServePublished") + .HasColumnType("boolean"); + + b.Property("Stage") + .HasColumnType("smallint"); + + b.Property("UserInfoApiKey") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("UserInfoRole") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("UserInfoApiKey"); + + b.ToTable("UserInfos"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.State.TextContentState", b => + { + b.Property("UniqueContentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("State") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.HasKey("UniqueContentId"); + + b.ToTable("TextState", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.History.HistoryEvent", b => + { + b.Property("Id") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Actor") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Channel") + .IsRequired() + .HasColumnType("text"); + + b.Property("Created") + .HasColumnType("timestamp with time zone"); + + b.Property("EventType") + .IsRequired() + .HasColumnType("text"); + + b.Property("OwnerId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Parameters") + .IsRequired() + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("HistoryEvent"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Rules.EFRuleEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("AppId"); + + b.Property("IndexedDeleted") + .HasColumnType("boolean") + .HasColumnName("Deleted"); + + b.Property("IndexedId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("Id"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Rule", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Schemas.EFSchemaEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("AppId"); + + b.Property("IndexedDeleted") + .HasColumnType("boolean") + .HasColumnName("Deleted"); + + b.Property("IndexedId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("Id"); + + b.Property("IndexedName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("Name"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Schema", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Teams.EFTeamEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("IndexedAuthDomain") + .HasColumnType("text") + .HasColumnName("AuthDomain"); + + b.Property("IndexedDeleted") + .HasColumnType("boolean") + .HasColumnName("Deleted"); + + b.Property("IndexedUserIds") + .IsRequired() + .HasColumnType("text") + .HasColumnName("UserIds"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Team", (string)null); + }); + + modelBuilder.Entity("Squidex.Events.EntityFramework.EFEventCommit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("EventStream") + .IsRequired() + .HasMaxLength(750) + .HasColumnType("character varying(750)"); + + b.Property("EventStreamOffset") + .HasColumnType("bigint"); + + b.PrimitiveCollection("Events") + .IsRequired() + .HasColumnType("text[]"); + + b.Property("EventsCount") + .HasColumnType("bigint"); + + b.Property("Position") + .HasColumnType("bigint"); + + b.Property("Timestamp") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("EventStream", "EventStreamOffset") + .IsUnique(); + + b.HasIndex("EventStream", "Position"); + + b.HasIndex("EventStream", "Timestamp"); + + b.ToTable("Events"); + }); + + modelBuilder.Entity("Squidex.Events.EntityFramework.EFPosition", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("Position") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("EventPosition"); + }); + + modelBuilder.Entity("Squidex.Flows.EntityFramework.EFCronJobEntity", b => + { + b.Property("Id") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("text"); + + b.Property("DueTime") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("DueTime"); + + b.ToTable("CronJobs", (string)null); + }); + + modelBuilder.Entity("Squidex.Flows.EntityFramework.EFFlowStateEntity", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Created") + .HasColumnType("timestamp with time zone"); + + b.Property("DefinitionId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("DueTime") + .HasColumnType("timestamp with time zone"); + + b.Property("OwnerId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("SchedulePartition") + .HasColumnType("integer"); + + b.Property("State") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("DueTime", "SchedulePartition"); + + b.ToTable("Flows", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.Caching.EFCacheEntity", b => + { + b.Property("Key") + .HasColumnType("text"); + + b.Property("Expires") + .HasColumnType("timestamp with time zone"); + + b.Property("Value") + .IsRequired() + .HasColumnType("bytea"); + + b.HasKey("Key"); + + b.ToTable("Cache", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.Log.EFRequestEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Key") + .IsRequired() + .HasColumnType("text"); + + b.Property("Properties") + .IsRequired() + .HasColumnType("jsonb"); + + b.Property("Timestamp") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("Key"); + + b.ToTable("Requests", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.Migrations.EFMigrationEntity", b => + { + b.Property("Id") + .HasColumnType("integer"); + + b.Property("IsLocked") + .HasColumnType("boolean"); + + b.Property("Version") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("Migrations", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_UISettings", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Index_TagHistory", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_UsageNotifications", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Counters", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_JobsState", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_UsageTracker", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Index_Tags", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Identity_Keys", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Identity_Xml", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_EventConsumerState", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Document") + .HasColumnType("jsonb"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Names", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.UsageTracking.EFUsageCounterEntity", b => + { + b.Property("Key") + .HasColumnType("text"); + + b.Property("Date") + .HasColumnType("timestamp with time zone"); + + b.Property("Category") + .HasColumnType("text"); + + b.Property("CounterKey") + .HasColumnType("text"); + + b.Property("CounterValue") + .HasColumnType("double precision"); + + b.HasKey("Key", "Date", "Category", "CounterKey"); + + b.ToTable("Counter", (string)null); + }); + + modelBuilder.Entity("Squidex.Messaging.EntityFramework.EFMessage", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("ChannelName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("MessageData") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("MessageHeaders") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("character varying(2000)"); + + b.Property("QueueName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("TimeHandled") + .HasColumnType("timestamp with time zone"); + + b.Property("TimeToLive") + .HasColumnType("timestamp with time zone"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("ChannelName", "TimeHandled"); + + b.ToTable("Messages", (string)null); + }); + + modelBuilder.Entity("Squidex.Messaging.EntityFramework.EFMessagingDataEntity", b => + { + b.Property("Group") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Key") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("Expiration") + .HasColumnType("timestamp with time zone"); + + b.Property("ValueData") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("ValueFormat") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ValueType") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.HasKey("Group", "Key"); + + b.HasIndex("Expiration"); + + b.ToTable("MessagingData", (string)null); + }); + + modelBuilder.Entity("YDotNet.Server.EntityFramework.YDotNetDocument", b => + { + b.Property("Id") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("Expiration") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.ToTable("YDotNetDocument", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreToken", b => + { + b.HasOne("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreAuthorization", "Authorization") + .WithMany("Tokens") + .HasForeignKey("AuthorizationId"); + + b.Navigation("Authorization"); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Navigation("Tokens"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/20260323155026_MigrateToNet10.cs b/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/20260323155026_MigrateToNet10.cs new file mode 100644 index 000000000..3b240c5d4 --- /dev/null +++ b/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/20260323155026_MigrateToNet10.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Squidex.Providers.Postgres.App.Migrations +{ + /// + public partial class MigrateToNet10 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "ApplicationId", + table: "OpenIddictAuthorizations", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "ApplicationId", + table: "OpenIddictAuthorizations", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + } + } +} diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/PostgresDbContextModelSnapshot.cs b/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/PostgresDbContextModelSnapshot.cs index 73fe5610f..da3d98b6f 100644 --- a/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/PostgresDbContextModelSnapshot.cs +++ b/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/Migrations/PostgresDbContextModelSnapshot.cs @@ -18,7 +18,7 @@ namespace Squidex.Providers.Postgres.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.16") + .HasAnnotation("ProductVersion", "10.0.5") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis"); @@ -227,7 +227,6 @@ namespace Squidex.Providers.Postgres.Migrations .HasColumnType("text"); b.Property("ApplicationId") - .IsRequired() .HasColumnType("text"); b.Property("ConcurrencyToken") @@ -323,7 +322,7 @@ namespace Squidex.Providers.Postgres.Migrations b.ToTable("OpenIddictTokens", (string)null); }); - modelBuilder.Entity("Squidex.AI.Mongo.EFChatEntity", b => + modelBuilder.Entity("Squidex.AI.EntityFramework.EFChatEntity", b => { b.Property("Id") .HasMaxLength(255) @@ -1104,7 +1103,7 @@ namespace Squidex.Providers.Postgres.Migrations b.Property("EventStreamOffset") .HasColumnType("bigint"); - b.Property("Events") + b.PrimitiveCollection("Events") .IsRequired() .HasColumnType("text[]"); diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/PostgresAppDbContextDesignTimeFactory.cs b/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/PostgresAppDbContextDesignTimeFactory.cs index 1796aff91..19ef296b4 100644 --- a/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/PostgresAppDbContextDesignTimeFactory.cs +++ b/backend/src/Squidex.Data.EntityFramework/Providers/Postgres/App/PostgresAppDbContextDesignTimeFactory.cs @@ -16,7 +16,7 @@ public sealed class PostgresAppDbContextDesignTimeFactory : IDesignTimeDbContext { public PostgresAppDbContext CreateDbContext(string[] args) { - const string ConnectionString = "Server=localhost;Port=54320;Database=test;User=postgres;Password=postgres"; + const string ConnectionString = "Server=localhost;Port=54320;Database=test;Username=postgres;Password=postgres"; var builder = new DbContextOptionsBuilder() .UseNpgsql(ConnectionString, options => diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/20260323155035_MigrateToNet10.Designer.cs b/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/20260323155035_MigrateToNet10.Designer.cs new file mode 100644 index 000000000..e51bc9de8 --- /dev/null +++ b/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/20260323155035_MigrateToNet10.Designer.cs @@ -0,0 +1,1631 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using NetTopologySuite.Geometries; +using Squidex.Providers.SqlServer.App; + +#nullable disable + +namespace Squidex.Providers.SqlServer.App.Migrations +{ + [DbContext(typeof(SqlServerAppDbContext))] + [Migration("20260323155035_MigrateToNet10")] + partial class MigrateToNet10 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("bit"); + + b.Property("LockoutEnabled") + .HasColumnType("bit"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); + + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("RoleId") + .HasColumnType("nvarchar(450)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("ApplicationId") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Scopes") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("ApplicationId") + .HasColumnType("nvarchar(450)"); + + b.Property("AuthorizationId") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2"); + + b.Property("Payload") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedemptionDate") + .HasColumnType("datetime2"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId") + .IsUnique() + .HasFilter("[ReferenceId] IS NOT NULL"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Squidex.AI.EntityFramework.EFChatEntity", b => + { + b.Property("Id") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("LastUpdated") + .HasColumnType("datetime2"); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("LastUpdated"); + + b.ToTable("Chats", (string)null); + }); + + modelBuilder.Entity("Squidex.Assets.EntityFramework.EFAssetKeyValueEntity", b => + { + b.Property("Key") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Expires") + .HasColumnType("datetimeoffset"); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Key"); + + b.HasIndex("Expires"); + + b.ToTable("AssetKeyValueStore_TusMetadata", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Apps.EFAppEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("IndexedCreated") + .HasColumnType("datetimeoffset") + .HasColumnName("Created"); + + b.Property("IndexedDeleted") + .HasColumnType("bit") + .HasColumnName("Deleted"); + + b.Property("IndexedName") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("Name"); + + b.Property("IndexedTeamId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)") + .HasColumnName("TeamId"); + + b.Property("IndexedUserIds") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("UserIds"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_App", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Assets.EFAssetEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Created") + .HasColumnType("datetimeoffset"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FileHash") + .HasColumnType("nvarchar(max)"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("FileVersion") + .HasColumnType("bigint"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsProtected") + .HasColumnType("bit"); + + b.Property("LastModified") + .HasColumnType("datetimeoffset"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Metadata") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MimeType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Slug") + .HasColumnType("nvarchar(max)"); + + b.Property("Tags") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TotalSize") + .HasColumnType("bigint"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.HasIndex("IndexedAppId", "Id"); + + b.ToTable("Assets"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Assets.EFAssetFolderEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Created") + .HasColumnType("datetimeoffset"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FolderName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModified") + .HasColumnType("datetimeoffset"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ParentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.HasIndex("IndexedAppId", "Id"); + + b.ToTable("AssetFolders"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFContentCompleteEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Created") + .HasColumnType("datetimeoffset"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IndexedSchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModified") + .HasColumnType("datetimeoffset"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("NewData") + .HasColumnType("nvarchar(max)"); + + b.Property("NewStatus") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ScheduleJob") + .HasColumnType("nvarchar(max)"); + + b.Property("ScheduledAt") + .HasColumnType("datetimeoffset"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TranslationStatus") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("ContentsAll", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFContentPublishedEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Created") + .HasColumnType("datetimeoffset"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Id") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IndexedSchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModified") + .HasColumnType("datetimeoffset"); + + b.Property("LastModifiedBy") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("NewData") + .HasColumnType("nvarchar(max)"); + + b.Property("NewStatus") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ScheduleJob") + .HasColumnType("nvarchar(max)"); + + b.Property("ScheduledAt") + .HasColumnType("datetimeoffset"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TranslationStatus") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("ContentsPublished", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFContentTableEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("AppId", "SchemaId") + .IsUnique(); + + b.ToTable("ContentTables", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFReferenceCompleteEntity", b => + { + b.Property("AppId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("FromKey") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ToId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("FromSchema") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)") + .HasDefaultValue("00000000-0000-0000-0000-000000000000"); + + b.HasKey("AppId", "FromKey", "ToId"); + + b.ToTable("ContentReferencesAll", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.EFReferencePublishedEntity", b => + { + b.Property("AppId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("FromKey") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ToId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("FromSchema") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)") + .HasDefaultValue("00000000-0000-0000-0000-000000000000"); + + b.HasKey("AppId", "FromKey", "ToId"); + + b.ToTable("ContentReferencesPublished", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.EFTextIndexGeoEntity", b => + { + b.Property("Id") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("GeoField") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("GeoObject") + .IsRequired() + .HasColumnType("geography"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ServeAll") + .HasColumnType("bit"); + + b.Property("ServePublished") + .HasColumnType("bit"); + + b.Property("Stage") + .HasColumnType("tinyint"); + + b.HasKey("Id"); + + b.ToTable("Geos"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.EFTextIndexTextEntity", b => + { + b.Property("Id") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ServeAll") + .HasColumnType("bit"); + + b.Property("ServePublished") + .HasColumnType("bit"); + + b.Property("Stage") + .HasColumnType("tinyint"); + + b.Property("Texts") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Texts"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.EFTextIndexUserInfoEntity", b => + { + b.Property("Id") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("SchemaId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ServeAll") + .HasColumnType("bit"); + + b.Property("ServePublished") + .HasColumnType("bit"); + + b.Property("Stage") + .HasColumnType("tinyint"); + + b.Property("UserInfoApiKey") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("UserInfoRole") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("UserInfoApiKey"); + + b.ToTable("UserInfos"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Contents.Text.State.TextContentState", b => + { + b.Property("UniqueContentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("State") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("UniqueContentId"); + + b.ToTable("TextState", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.History.HistoryEvent", b => + { + b.Property("Id") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Actor") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Channel") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Created") + .HasColumnType("datetimeoffset"); + + b.Property("EventType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OwnerId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Parameters") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("HistoryEvent"); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Rules.EFRuleEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)") + .HasColumnName("AppId"); + + b.Property("IndexedDeleted") + .HasColumnType("bit") + .HasColumnName("Deleted"); + + b.Property("IndexedId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)") + .HasColumnName("Id"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Rule", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Schemas.EFSchemaEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("IndexedAppId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)") + .HasColumnName("AppId"); + + b.Property("IndexedDeleted") + .HasColumnType("bit") + .HasColumnName("Deleted"); + + b.Property("IndexedId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)") + .HasColumnName("Id"); + + b.Property("IndexedName") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("Name"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Schema", (string)null); + }); + + modelBuilder.Entity("Squidex.Domain.Apps.Entities.Teams.EFTeamEntity", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("IndexedAuthDomain") + .HasColumnType("nvarchar(max)") + .HasColumnName("AuthDomain"); + + b.Property("IndexedDeleted") + .HasColumnType("bit") + .HasColumnName("Deleted"); + + b.Property("IndexedUserIds") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("UserIds"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Team", (string)null); + }); + + modelBuilder.Entity("Squidex.Events.EntityFramework.EFEventCommit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EventStream") + .IsRequired() + .HasMaxLength(750) + .HasColumnType("nvarchar(750)"); + + b.Property("EventStreamOffset") + .HasColumnType("bigint"); + + b.PrimitiveCollection("Events") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventsCount") + .HasColumnType("bigint"); + + b.Property("Position") + .HasColumnType("bigint"); + + b.Property("Timestamp") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("EventStream", "EventStreamOffset") + .IsUnique(); + + b.HasIndex("EventStream", "Position"); + + b.HasIndex("EventStream", "Timestamp"); + + b.ToTable("Events"); + }); + + modelBuilder.Entity("Squidex.Events.EntityFramework.EFPosition", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("Position") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("EventPosition"); + }); + + modelBuilder.Entity("Squidex.Flows.EntityFramework.EFCronJobEntity", b => + { + b.Property("Id") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("DueTime") + .HasColumnType("datetimeoffset"); + + b.HasKey("Id"); + + b.HasIndex("DueTime"); + + b.ToTable("CronJobs", (string)null); + }); + + modelBuilder.Entity("Squidex.Flows.EntityFramework.EFFlowStateEntity", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Created") + .HasColumnType("datetimeoffset"); + + b.Property("DefinitionId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("DueTime") + .HasColumnType("datetimeoffset"); + + b.Property("OwnerId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("SchedulePartition") + .HasColumnType("int"); + + b.Property("State") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DueTime", "SchedulePartition"); + + b.ToTable("Flows", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.Caching.EFCacheEntity", b => + { + b.Property("Key") + .HasColumnType("nvarchar(450)"); + + b.Property("Expires") + .HasColumnType("datetime2"); + + b.Property("Value") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.HasKey("Key"); + + b.ToTable("Cache", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.Log.EFRequestEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Key") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Properties") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Timestamp") + .HasColumnType("datetimeoffset"); + + b.HasKey("Id"); + + b.HasIndex("Key"); + + b.ToTable("Requests", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.Migrations.EFMigrationEntity", b => + { + b.Property("Id") + .HasColumnType("int"); + + b.Property("IsLocked") + .HasColumnType("bit"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Migrations", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_UISettings", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Index_TagHistory", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_UsageNotifications", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Counters", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_JobsState", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_UsageTracker", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Index_Tags", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Identity_Keys", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Identity_Xml", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_EventConsumerState", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.States.EFState", b => + { + b.Property("DocumentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Document") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("bigint"); + + b.HasKey("DocumentId"); + + b.ToTable("States_Names", (string)null); + }); + + modelBuilder.Entity("Squidex.Infrastructure.UsageTracking.EFUsageCounterEntity", b => + { + b.Property("Key") + .HasColumnType("nvarchar(450)"); + + b.Property("Date") + .HasColumnType("datetime2"); + + b.Property("Category") + .HasColumnType("nvarchar(450)"); + + b.Property("CounterKey") + .HasColumnType("nvarchar(450)"); + + b.Property("CounterValue") + .HasColumnType("float"); + + b.HasKey("Key", "Date", "Category", "CounterKey"); + + b.ToTable("Counter", (string)null); + }); + + modelBuilder.Entity("Squidex.Messaging.EntityFramework.EFMessage", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ChannelName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("MessageData") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("MessageHeaders") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("QueueName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("TimeHandled") + .HasColumnType("datetime2"); + + b.Property("TimeToLive") + .HasColumnType("datetime2"); + + b.Property("Version") + .IsConcurrencyToken() + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ChannelName", "TimeHandled"); + + b.ToTable("Messages", (string)null); + }); + + modelBuilder.Entity("Squidex.Messaging.EntityFramework.EFMessagingDataEntity", b => + { + b.Property("Group") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Key") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.Property("ValueData") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("ValueFormat") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ValueType") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("Group", "Key"); + + b.HasIndex("Expiration"); + + b.ToTable("MessagingData", (string)null); + }); + + modelBuilder.Entity("YDotNet.Server.EntityFramework.YDotNetDocument", b => + { + b.Property("Id") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("YDotNetDocument", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreToken", b => + { + b.HasOne("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreAuthorization", "Authorization") + .WithMany("Tokens") + .HasForeignKey("AuthorizationId"); + + b.Navigation("Authorization"); + }); + + modelBuilder.Entity("OpenIddict.EntityFrameworkCore.Models.OpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Navigation("Tokens"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/20260323155035_MigrateToNet10.cs b/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/20260323155035_MigrateToNet10.cs new file mode 100644 index 000000000..83417a13a --- /dev/null +++ b/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/20260323155035_MigrateToNet10.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Squidex.Providers.SqlServer.App.Migrations +{ + /// + public partial class MigrateToNet10 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "ApplicationId", + table: "OpenIddictAuthorizations", + type: "nvarchar(450)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(450)"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "ApplicationId", + table: "OpenIddictAuthorizations", + type: "nvarchar(450)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(450)", + oldNullable: true); + } + } +} diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/SqlServerDbContextModelSnapshot.cs b/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/SqlServerDbContextModelSnapshot.cs index abcb6f693..d16b8e0db 100644 --- a/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/SqlServerDbContextModelSnapshot.cs +++ b/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/Migrations/SqlServerDbContextModelSnapshot.cs @@ -18,7 +18,7 @@ namespace Squidex.Providers.SqlServer.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.16") + .HasAnnotation("ProductVersion", "10.0.5") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -228,7 +228,6 @@ namespace Squidex.Providers.SqlServer.Migrations .HasColumnType("nvarchar(450)"); b.Property("ApplicationId") - .IsRequired() .HasColumnType("nvarchar(450)"); b.Property("ConcurrencyToken") @@ -325,7 +324,7 @@ namespace Squidex.Providers.SqlServer.Migrations b.ToTable("OpenIddictTokens", (string)null); }); - modelBuilder.Entity("Squidex.AI.Mongo.EFChatEntity", b => + modelBuilder.Entity("Squidex.AI.EntityFramework.EFChatEntity", b => { b.Property("Id") .HasMaxLength(255) @@ -1106,7 +1105,7 @@ namespace Squidex.Providers.SqlServer.Migrations b.Property("EventStreamOffset") .HasColumnType("bigint"); - b.Property("Events") + b.PrimitiveCollection("Events") .IsRequired() .HasColumnType("nvarchar(max)"); diff --git a/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/SqlServerAppDbContextDesignTimeFactory.cs b/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/SqlServerAppDbContextDesignTimeFactory.cs index 78b06ffa5..a19d54b13 100644 --- a/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/SqlServerAppDbContextDesignTimeFactory.cs +++ b/backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/App/SqlServerAppDbContextDesignTimeFactory.cs @@ -16,7 +16,7 @@ public sealed class SqlServerAppDbContextDesignTimeFactory : IDesignTimeDbContex { public SqlServerAppDbContext CreateDbContext(string[] args) { - const string ConnectionString = "Server=localhost;Port=14330;Database=test;User=sa;Password=sqlserver"; + const string ConnectionString = "Server=localhost;Port=14330;Database=test;User=sa;Password=SqlServer2026!?"; var builder = new DbContextOptionsBuilder() .UseSqlServer(ConnectionString, options => diff --git a/backend/src/Squidex.Data.EntityFramework/ServiceExtensions.cs b/backend/src/Squidex.Data.EntityFramework/ServiceExtensions.cs index 037dedc09..1679cdefb 100644 --- a/backend/src/Squidex.Data.EntityFramework/ServiceExtensions.cs +++ b/backend/src/Squidex.Data.EntityFramework/ServiceExtensions.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Identity; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.Extensions.Caching.Distributed; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -99,6 +100,9 @@ public static class ServiceExtensions options.MigrationsHistoryTable($"{name}MigrationHistory"); options.UseMicrosoftJson(MySqlCommonJsonChangeTrackingOptions.FullHierarchyOptimizedSemantically); }); + + builder.ConfigureWarnings(w => + w.Ignore(RelationalEventId.PendingModelChangesWarning)); }); services.AddSingleton(typeof(ISnapshotStore<>), typeof(MySqlSnapshotStore<>)); @@ -130,6 +134,9 @@ public static class ServiceExtensions { options.MigrationsHistoryTable($"{name}MigrationHistory"); }); + + builder.ConfigureWarnings(w => + w.Ignore(RelationalEventId.PendingModelChangesWarning)); }); services.AddSingleton(typeof(ISnapshotStore<>), typeof(PostgresSnapshotStore<>)); @@ -161,6 +168,9 @@ public static class ServiceExtensions { options.MigrationsHistoryTable($"{name}MigrationHistory"); }); + + builder.ConfigureWarnings(w => + w.Ignore(RelationalEventId.PendingModelChangesWarning)); }); services.AddSingleton(typeof(ISnapshotStore<>), typeof(SqlServerSnapshotStore<>)); diff --git a/backend/src/Squidex.Data.EntityFramework/Squidex.Data.EntityFramework.csproj b/backend/src/Squidex.Data.EntityFramework/Squidex.Data.EntityFramework.csproj index 0945d8303..fabb4acd4 100644 --- a/backend/src/Squidex.Data.EntityFramework/Squidex.Data.EntityFramework.csproj +++ b/backend/src/Squidex.Data.EntityFramework/Squidex.Data.EntityFramework.csproj @@ -1,6 +1,6 @@  - net8.0 + net10.0 Squidex latest enable @@ -19,41 +19,41 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - + + diff --git a/backend/src/Squidex.Data.EntityFramework/docker-compose.yml b/backend/src/Squidex.Data.EntityFramework/docker-compose.yml index 87a2caaed..4cfff6a25 100644 --- a/backend/src/Squidex.Data.EntityFramework/docker-compose.yml +++ b/backend/src/Squidex.Data.EntityFramework/docker-compose.yml @@ -9,7 +9,7 @@ services: - "54320:5432" migration_mysql: - image: mysql + image: mysql:8 environment: - MYSQL_DATABASE=test - MYSQL_USER=mysql @@ -23,7 +23,7 @@ services: migration_sqlserver: image: mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04 environment: - - SA_PASSWORD=sqlserver + - SA_PASSWORD=SqlServer2026!? - ACCEPT_EULA=Y ports: - "14330:1433" diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetEntity.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetEntity.cs index fa46014b0..666da91de 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetEntity.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetEntity.cs @@ -21,9 +21,7 @@ public record MongoAssetEntity : Asset, IVersionedEntity public static void RegisterClassMap() { - AssetItemClassMap.Register(); - - BsonClassMap.TryRegisterClassMap(cm => + BsonClassMap.RegisterClassMap(cm => { cm.MapProperty(x => x.DocumentId) .SetElementName("_id") @@ -34,7 +32,7 @@ public record MongoAssetEntity : Asset, IVersionedEntity .SetIsRequired(true); }); - BsonClassMap.TryRegisterClassMap(cm => + BsonClassMap.RegisterClassMap(cm => { cm.MapProperty(x => x.FileName) .SetElementName("fn") diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderEntity.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderEntity.cs index d826ddf12..83a94bbdc 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderEntity.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderEntity.cs @@ -21,7 +21,7 @@ public record MongoAssetFolderEntity : AssetFolder, IVersionedEntity public static void RegisterClassMap() { - BsonClassMap.TryRegisterClassMap(cm => + BsonClassMap.RegisterClassMap(cm => { cm.MapProperty(x => x.DocumentId) .SetElementName("_id") @@ -32,14 +32,12 @@ public record MongoAssetFolderEntity : AssetFolder, IVersionedEntity .SetIsRequired(true); }); - BsonClassMap.TryRegisterClassMap(cm => + BsonClassMap.RegisterClassMap(cm => { cm.MapProperty(x => x.FolderName) .SetElementName("fn") .SetIsRequired(true); }); - - AssetItemClassMap.Register(); } public static MongoAssetFolderEntity Create(SnapshotWriteJob job) diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderRepository.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderRepository.cs index 6d32b4a8e..15dab49ed 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderRepository.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderRepository.cs @@ -15,11 +15,6 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Assets; public sealed partial class MongoAssetFolderRepository(IMongoDatabase database) : MongoRepositoryBase(database), IAssetFolderRepository { - static MongoAssetFolderRepository() - { - MongoAssetFolderEntity.RegisterClassMap(); - } - protected override string CollectionName() { return "States_AssetFolders2"; diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderRepository_SnapshotStore.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderRepository_SnapshotStore.cs index cc63a8dbc..248d1efb2 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderRepository_SnapshotStore.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetFolderRepository_SnapshotStore.cs @@ -57,7 +57,7 @@ public sealed partial class MongoAssetFolderRepository : ISnapshotStore(x => nameof(x.Version)), ct); + await Collection.UpsertVersionedAsync(entityJob, Field.Of(x => nameof(x.Version)), ct); } } diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/AssetItemClassMap.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetItemClassMap.cs similarity index 79% rename from backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/AssetItemClassMap.cs rename to backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetItemClassMap.cs index a819347f9..ae70155d5 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/AssetItemClassMap.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetItemClassMap.cs @@ -10,13 +10,11 @@ using Squidex.Domain.Apps.Core.Assets; namespace Squidex.Domain.Apps.Entities.Assets; -internal static class AssetItemClassMap +internal static class MongoAssetItemClassMap { - public static void Register() + public static void RegisterClassMap() { - AppEntityClassMap.Register(); - - BsonClassMap.TryRegisterClassMap(cm => + BsonClassMap.RegisterClassMap(cm => { cm.MapProperty(x => x.ParentId) .SetElementName("pi") diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetRepository.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetRepository.cs index 6f6a7ed24..5122facb9 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetRepository.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetRepository.cs @@ -24,11 +24,6 @@ public sealed partial class MongoAssetRepository : MongoRepositoryBase log, string shardKey) : base(database) { diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetRepository_SnapshotStore.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetRepository_SnapshotStore.cs index c07cfea5c..84938ca0f 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetRepository_SnapshotStore.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Assets/MongoAssetRepository_SnapshotStore.cs @@ -57,7 +57,7 @@ public sealed partial class MongoAssetRepository : ISnapshotStore, IDelet { var entityJob = job.As(MongoAssetEntity.Create(job)); - await Collection.UpsertVersionedAsync(entityJob, Field.Of(x => nameof(x.Version)), ct); + await Collection.UpsertVersionedAsync(entityJob, Field.Of(x => nameof(x.Version)), ct); } } diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/MongoContentEntity.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/MongoContentEntity.cs index 1ec136b0e..bcb8a5787 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/MongoContentEntity.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/MongoContentEntity.cs @@ -34,9 +34,7 @@ public record MongoContentEntity : Content, IVersionedEntity public static void RegisterClassMap() { - AppEntityClassMap.Register(); - - BsonClassMap.TryRegisterClassMap(cm => + BsonClassMap.RegisterClassMap(cm => { cm.MapProperty(x => x.DocumentId) .SetElementName("_id") @@ -71,7 +69,7 @@ public record MongoContentEntity : Content, IVersionedEntity .SetIgnoreIfDefault(true); }); - BsonClassMap.TryRegisterClassMap(cm => + BsonClassMap.RegisterClassMap(cm => { cm.MapProperty(x => x.SchemaId) .SetElementName("si") @@ -93,8 +91,6 @@ public record MongoContentEntity : Content, IVersionedEntity .SetElementName("sj") .SetIgnoreIfDefault(true); }); - - EntityClassMap.Register(); } public WriteContent ToState() diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/MongoContentRepository.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/MongoContentRepository.cs index 954dec61c..1b3166ab1 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/MongoContentRepository.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/MongoContentRepository.cs @@ -49,15 +49,6 @@ public partial class MongoContentRepository( public bool CanUseTransactions { get; private set; } - static MongoContentRepository() - { - BsonEscapedDictionarySerializer.Register(); - BsonEscapedDictionarySerializer.Register(); - BsonEscapedDictionarySerializer.Register(); - BsonStringSerializer.Register(); - MongoContentEntity.RegisterClassMap(); - } - public async Task InitializeAsync( CancellationToken ct) { diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/AtlasTextIndex.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/AtlasTextIndex.cs index 36344e377..d62a4e641 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/AtlasTextIndex.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/AtlasTextIndex.cs @@ -25,7 +25,7 @@ public sealed class AtlasTextIndex(IMongoDatabase database, IHttpClientFactory a private static readonly LuceneQueryVisitor QueryVisitor = new LuceneQueryVisitor(AtlasIndexDefinition.GetFieldPath); private static readonly LuceneQueryAnalyzer QueryParser = new LuceneQueryAnalyzer(LuceneVersion.LUCENE_48, "*", - new StandardAnalyzer(LuceneVersion.LUCENE_48, CharArraySet.EMPTY_SET)); + new StandardAnalyzer(LuceneVersion.LUCENE_48, CharArraySet.Empty)); private readonly AtlasOptions atlasOptions = atlasOptions.Value; private string index; diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/MongoTextIndexerState.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/MongoTextIndexerState.cs index c53b7f29b..e3c168ae3 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/MongoTextIndexerState.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/MongoTextIndexerState.cs @@ -5,13 +5,11 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== -using MongoDB.Bson.Serialization; using MongoDB.Driver; using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Entities.Contents.Repositories; using Squidex.Domain.Apps.Entities.Contents.Text.State; -using Squidex.Domain.Apps.Entities.MongoDb; using Squidex.Infrastructure; namespace Squidex.Domain.Apps.Entities.Contents.Text; @@ -21,19 +19,6 @@ public sealed class MongoTextIndexerState( IContentRepository contentRepository) : MongoRepositoryBase(database), ITextIndexerState, IDeleter { - static MongoTextIndexerState() - { - BsonUniqueContentIdSerializer.Register(); - - BsonClassMap.TryRegisterClassMap(cm => - { - cm.MapIdProperty(x => x.UniqueContentId); - - cm.MapProperty(x => x.State) - .SetElementName("s"); - }); - } - int IDeleter.Order => -2000; protected override string CollectionName() diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/MongoTextStateClassMap.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/MongoTextStateClassMap.cs new file mode 100644 index 000000000..0c60a4168 --- /dev/null +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/Contents/Text/MongoTextStateClassMap.cs @@ -0,0 +1,25 @@ +// ========================================================================== +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex UG (haftungsbeschraenkt) +// All rights reserved. Licensed under the MIT license. +// ========================================================================== + +using MongoDB.Bson.Serialization; +using Squidex.Domain.Apps.Entities.Contents.Text.State; + +namespace Squidex.Domain.Apps.Entities.Contents.Text; + +internal static class MongoTextStateClassMap +{ + public static void RegisterClassMap() + { + BsonClassMap.RegisterClassMap(cm => + { + cm.MapIdProperty(x => x.UniqueContentId); + + cm.MapProperty(x => x.State) + .SetElementName("s"); + }); + } +} diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/History/MongoHistoryClassMap.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/History/MongoHistoryClassMap.cs new file mode 100644 index 000000000..51502ace3 --- /dev/null +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/History/MongoHistoryClassMap.cs @@ -0,0 +1,27 @@ +// ========================================================================== +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex UG (haftungsbeschraenkt) +// All rights reserved. Licensed under the MIT license. +// ========================================================================== + +using MongoDB.Bson.Serialization; + +namespace Squidex.Domain.Apps.Entities.History; + +internal static class MongoHistoryClassMap +{ + public static void RegisterClassMap() + { + BsonClassMap.RegisterClassMap(cm => + { + cm.AutoMap(); + + cm.MapProperty(x => x.OwnerId) + .SetElementName("AppId"); + + cm.MapProperty(x => x.EventType) + .SetElementName("Message"); + }); + } +} diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/History/MongoHistoryEventRepository.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/History/MongoHistoryEventRepository.cs index 68dd4f8eb..ed1a16d53 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/History/MongoHistoryEventRepository.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/History/MongoHistoryEventRepository.cs @@ -17,16 +17,6 @@ public sealed class MongoHistoryEventRepository(IMongoDatabase database) : Mongo { static MongoHistoryEventRepository() { - BsonClassMap.TryRegisterClassMap(cm => - { - cm.AutoMap(); - - cm.MapProperty(x => x.OwnerId) - .SetElementName("AppId"); - - cm.MapProperty(x => x.EventType) - .SetElementName("Message"); - }); } protected override string CollectionName() diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/AppEntityClassMap.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/MongoAppEntityClassMap.cs similarity index 82% rename from backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/AppEntityClassMap.cs rename to backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/MongoAppEntityClassMap.cs index 63a6ee793..3f04c0f7b 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/AppEntityClassMap.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/MongoAppEntityClassMap.cs @@ -10,13 +10,11 @@ using Squidex.Domain.Apps.Core; namespace Squidex.Domain.Apps.Entities; -public static class AppEntityClassMap +public static class MongoAppEntityClassMap { - public static void Register() + public static void RegisterClassMap() { - EntityClassMap.Register(); - - BsonClassMap.TryRegisterClassMap(cm => + BsonClassMap.RegisterClassMap(cm => { cm.MapProperty(x => x.AppId) .SetElementName("ai") diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/EntityClassMap.cs b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/MongoEntityClassMap.cs similarity index 90% rename from backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/EntityClassMap.cs rename to backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/MongoEntityClassMap.cs index 40fd379aa..dc19a66a5 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/EntityClassMap.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Apps/Entities/MongoEntityClassMap.cs @@ -10,11 +10,11 @@ using Squidex.Infrastructure.Commands; namespace Squidex.Domain.Apps.Entities; -internal static class EntityClassMap +internal static class MongoEntityClassMap { - public static void Register() + public static void RegisterClassMap() { - BsonClassMap.TryRegisterClassMap(cm => + BsonClassMap.RegisterClassMap(cm => { cm.MapProperty(x => x.Id) .SetElementName("id") diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Users/IdentityUserForwardingSerializer.cs b/backend/src/Squidex.Data.MongoDb/Domain/Users/IdentityUserForwardingSerializer.cs new file mode 100644 index 000000000..3a8a12484 --- /dev/null +++ b/backend/src/Squidex.Data.MongoDb/Domain/Users/IdentityUserForwardingSerializer.cs @@ -0,0 +1,37 @@ +// ========================================================================== +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex UG (haftungsbeschraenkt) +// All rights reserved. Licensed under the MIT license. +// ========================================================================== + +using Microsoft.AspNetCore.Identity; +using MongoDB.Bson.Serialization; +using MongoDB.Bson.Serialization.Serializers; + +namespace Squidex.Domain.Users; + +internal sealed class IdentityUserForwardingSerializer + : SerializerBase, IBsonDocumentSerializer +{ + private static readonly IBsonSerializer MongoUserSerializer = + BsonSerializer.LookupSerializer(); + + public override IdentityUser Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args) + { + args.NominalType = typeof(MongoUser); + return MongoUserSerializer.Deserialize(context, args); + } + + public override void Serialize(BsonSerializationContext context, BsonSerializationArgs args, IdentityUser value) + { + args.NominalType = typeof(MongoUser); + MongoUserSerializer.Serialize(context, args, (MongoUser)value); + } + + public bool TryGetMemberSerializationInfo(string memberName, out BsonSerializationInfo serializationInfo) + { + return ((IBsonDocumentSerializer)MongoUserSerializer) + .TryGetMemberSerializationInfo(memberName, out serializationInfo); + } +} diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Users/MongoIdentityClassMap.cs b/backend/src/Squidex.Data.MongoDb/Domain/Users/MongoIdentityClassMap.cs new file mode 100644 index 000000000..951aa67c6 --- /dev/null +++ b/backend/src/Squidex.Data.MongoDb/Domain/Users/MongoIdentityClassMap.cs @@ -0,0 +1,116 @@ +// ========================================================================== +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex UG (haftungsbeschraenkt) +// All rights reserved. Licensed under the MIT license. +// ========================================================================== + +using System.Security.Claims; +using Microsoft.AspNetCore.Identity; +using MongoDB.Bson; +using MongoDB.Bson.Serialization; +using MongoDB.Bson.Serialization.Serializers; + +namespace Squidex.Domain.Users; + +internal static class MongoIdentityClassMap +{ + public static void RegisterClassMap() + { + BsonClassMap.RegisterClassMap>(cm => + { + cm.AutoMap(); + + cm.MapMember(x => x.Id) + .SetSerializer(new StringSerializer(BsonType.ObjectId)); + + cm.UnmapMember(x => x.ConcurrencyStamp); + }); + + BsonClassMap.RegisterClassMap(cm => + { + cm.MapConstructor(typeof(Claim).GetConstructors() + .First(x => + { + var parameters = x.GetParameters(); + + return parameters.Length == 2 && + parameters[0].Name == "type" && + parameters[0].ParameterType == typeof(string) && + parameters[1].Name == "value" && + parameters[1].ParameterType == typeof(string); + })) + .SetArguments( + [ + nameof(Claim.Type), + nameof(Claim.Value), + ]); + + cm.MapMember(x => x.Type); + cm.MapMember(x => x.Value); + }); + + BsonClassMap.RegisterClassMap(cm => + { + cm.MapConstructor(typeof(UserLogin).GetConstructors() + .First(x => + { + var parameters = x.GetParameters(); + + return parameters.Length == 3; + })) + .SetArguments( + [ + nameof(UserLogin.LoginProvider), + nameof(UserLogin.ProviderKey), + nameof(UserLogin.ProviderDisplayName), + ]); + + cm.AutoMap(); + }); + + BsonClassMap.RegisterClassMap>(cm => + { + cm.AutoMap(); + + cm.UnmapMember(x => x.UserId); + }); + + BsonClassMap.RegisterClassMap>(cm => + { + cm.AutoMap(); + + cm.MapMember(x => x.Id) + .SetSerializer(new StringSerializer(BsonType.ObjectId)); + + cm.MapMember(x => x.AccessFailedCount) + .SetIgnoreIfDefault(true); + + cm.MapMember(x => x.EmailConfirmed) + .SetIgnoreIfDefault(true); + + cm.MapMember(x => x.LockoutEnd) + .SetElementName("LockoutEndDateUtc").SetIgnoreIfNull(true); + + cm.MapMember(x => x.LockoutEnabled) + .SetIgnoreIfDefault(true); + + cm.MapMember(x => x.PasswordHash) + .SetIgnoreIfNull(true); + + cm.MapMember(x => x.PhoneNumber) + .SetIgnoreIfNull(true); + + cm.MapMember(x => x.PhoneNumberConfirmed) + .SetIgnoreIfDefault(true); + + cm.MapMember(x => x.SecurityStamp) + .SetIgnoreIfNull(true); + + cm.MapMember(x => x.TwoFactorEnabled) + .SetIgnoreIfDefault(true); + }); + + BsonSerializer.RegisterSerializer(new IdentityUserForwardingSerializer()); + } +} diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Users/MongoRoleStore.cs b/backend/src/Squidex.Data.MongoDb/Domain/Users/MongoRoleStore.cs index 52292afff..e515b4d3c 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Users/MongoRoleStore.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Users/MongoRoleStore.cs @@ -6,9 +6,6 @@ // ========================================================================== using Microsoft.AspNetCore.Identity; -using MongoDB.Bson; -using MongoDB.Bson.Serialization; -using MongoDB.Bson.Serialization.Serializers; using MongoDB.Driver; using Squidex.Infrastructure; @@ -16,19 +13,6 @@ namespace Squidex.Domain.Users; public sealed class MongoRoleStore(IMongoDatabase database) : MongoRepositoryBase(database), IRoleStore { - static MongoRoleStore() - { - BsonClassMap.RegisterClassMap>(cm => - { - cm.AutoMap(); - - cm.MapMember(x => x.Id) - .SetSerializer(new StringSerializer(BsonType.ObjectId)); - - cm.UnmapMember(x => x.ConcurrencyStamp); - }); - } - protected override string CollectionName() { return "Identity_Roles"; diff --git a/backend/src/Squidex.Data.MongoDb/Domain/Users/MongoUserStore.cs b/backend/src/Squidex.Data.MongoDb/Domain/Users/MongoUserStore.cs index e8651a370..365ce0454 100644 --- a/backend/src/Squidex.Data.MongoDb/Domain/Users/MongoUserStore.cs +++ b/backend/src/Squidex.Data.MongoDb/Domain/Users/MongoUserStore.cs @@ -8,8 +8,6 @@ using System.Security.Claims; using Microsoft.AspNetCore.Identity; using MongoDB.Bson; -using MongoDB.Bson.Serialization; -using MongoDB.Bson.Serialization.Serializers; using MongoDB.Driver; using Squidex.Infrastructure; @@ -35,93 +33,7 @@ public sealed class MongoUserStore(IMongoDatabase database) : private const string InternalLoginProvider = "[AspNetUserStore]"; private const string AuthenticatorKeyTokenName = "AuthenticatorKey"; private const string RecoveryCodeTokenName = "RecoveryCodes"; - - static MongoUserStore() - { - BsonClassMap.RegisterClassMap(cm => - { - cm.MapConstructor(typeof(Claim).GetConstructors() - .First(x => - { - var parameters = x.GetParameters(); - - return parameters.Length == 2 && - parameters[0].Name == "type" && - parameters[0].ParameterType == typeof(string) && - parameters[1].Name == "value" && - parameters[1].ParameterType == typeof(string); - })) - .SetArguments(new[] - { - nameof(Claim.Type), - nameof(Claim.Value), - }); - - cm.MapMember(x => x.Type); - cm.MapMember(x => x.Value); - }); - - BsonClassMap.RegisterClassMap(cm => - { - cm.MapConstructor(typeof(UserLogin).GetConstructors() - .First(x => - { - var parameters = x.GetParameters(); - - return parameters.Length == 3; - })) - .SetArguments(new[] - { - nameof(UserLogin.LoginProvider), - nameof(UserLogin.ProviderKey), - nameof(UserLogin.ProviderDisplayName), - }); - - cm.AutoMap(); - }); - - BsonClassMap.RegisterClassMap>(cm => - { - cm.AutoMap(); - - cm.UnmapMember(x => x.UserId); - }); - - BsonClassMap.RegisterClassMap>(cm => - { - cm.AutoMap(); - - cm.MapMember(x => x.Id) - .SetSerializer(new StringSerializer(BsonType.ObjectId)); - - cm.MapMember(x => x.AccessFailedCount) - .SetIgnoreIfDefault(true); - - cm.MapMember(x => x.EmailConfirmed) - .SetIgnoreIfDefault(true); - - cm.MapMember(x => x.LockoutEnd) - .SetElementName("LockoutEndDateUtc").SetIgnoreIfNull(true); - - cm.MapMember(x => x.LockoutEnabled) - .SetIgnoreIfDefault(true); - - cm.MapMember(x => x.PasswordHash) - .SetIgnoreIfNull(true); - - cm.MapMember(x => x.PhoneNumber) - .SetIgnoreIfNull(true); - - cm.MapMember(x => x.PhoneNumberConfirmed) - .SetIgnoreIfDefault(true); - - cm.MapMember(x => x.SecurityStamp) - .SetIgnoreIfNull(true); - - cm.MapMember(x => x.TwoFactorEnabled) - .SetIgnoreIfDefault(true); - }); - } + private IMongoCollection queryableCollection; protected override string CollectionName() { @@ -165,7 +77,7 @@ public sealed class MongoUserStore(IMongoDatabase database) : public IQueryable Users { - get => Collection.AsQueryable(); + get => (queryableCollection ??= Database.GetCollection(CollectionName())).AsQueryable(); } public bool IsId(string id) @@ -181,7 +93,9 @@ public sealed class MongoUserStore(IMongoDatabase database) : public async Task FindByIdAsync(string userId, CancellationToken cancellationToken) { - var result = await Collection.Find(x => x.Id == userId).FirstOrDefaultAsync(cancellationToken); + var result = + await Collection.Find(x => x.Id == userId) + .FirstOrDefaultAsync(cancellationToken); return result; } @@ -189,7 +103,9 @@ public sealed class MongoUserStore(IMongoDatabase database) : public async Task FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken) { - var result = await Collection.Find(x => x.NormalizedEmail == normalizedEmail).FirstOrDefaultAsync(cancellationToken); + var result = + await Collection.Find(x => x.NormalizedEmail == normalizedEmail) + .FirstOrDefaultAsync(cancellationToken); return result; } @@ -197,7 +113,9 @@ public sealed class MongoUserStore(IMongoDatabase database) : public async Task FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken) { - var result = await Collection.Find(x => x.NormalizedEmail == normalizedUserName).FirstOrDefaultAsync(cancellationToken); + var result = + await Collection.Find(x => x.NormalizedEmail == normalizedUserName) + .FirstOrDefaultAsync(cancellationToken); return result; } @@ -205,7 +123,9 @@ public sealed class MongoUserStore(IMongoDatabase database) : public async Task FindByLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken) { - var result = await Collection.Find(Filter.ElemMatch(x => x.Logins, BuildFilter(loginProvider, providerKey))).FirstOrDefaultAsync(cancellationToken); + var result = + await Collection.Find(Filter.ElemMatch(x => x.Logins, BuildFilter(loginProvider, providerKey))) + .FirstOrDefaultAsync(cancellationToken); return result; } @@ -213,7 +133,9 @@ public sealed class MongoUserStore(IMongoDatabase database) : public async Task> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken) { - var result = await Collection.Find(x => x.Claims.Exists(y => y.Type == claim.Type && y.Value == claim.Value)).ToListAsync(cancellationToken); + var result = + await Collection.Find(x => x.Claims.Exists(y => y.Type == claim.Type && y.Value == claim.Value)) + .ToListAsync(cancellationToken); return result.OfType().ToList(); } @@ -221,7 +143,9 @@ public sealed class MongoUserStore(IMongoDatabase database) : public async Task> GetUsersInRoleAsync(string roleName, CancellationToken cancellationToken) { - var result = await Collection.Find(x => x.Roles.Contains(roleName)).ToListAsync(cancellationToken); + var result = + await Collection.Find(x => x.Roles.Contains(roleName)) + .ToListAsync(cancellationToken); return result.OfType().ToList(); } @@ -231,7 +155,8 @@ public sealed class MongoUserStore(IMongoDatabase database) : { user.Id = ObjectId.GenerateNewId().ToString(); - await Collection.InsertOneAsync((MongoUser)user, null, cancellationToken); + await Collection.InsertOneAsync((MongoUser)user, null, + cancellationToken); return IdentityResult.Success; } @@ -239,7 +164,8 @@ public sealed class MongoUserStore(IMongoDatabase database) : public async Task UpdateAsync(IdentityUser user, CancellationToken cancellationToken) { - await Collection.ReplaceOneAsync(x => x.Id == user.Id, (MongoUser)user, cancellationToken: cancellationToken); + await Collection.ReplaceOneAsync(x => x.Id == user.Id, (MongoUser)user, + cancellationToken: cancellationToken); return IdentityResult.Success; } @@ -247,7 +173,8 @@ public sealed class MongoUserStore(IMongoDatabase database) : public async Task DeleteAsync(IdentityUser user, CancellationToken cancellationToken) { - await Collection.DeleteOneAsync(x => x.Id == user.Id, null, cancellationToken); + await Collection.DeleteOneAsync(x => x.Id == user.Id, null, + cancellationToken); return IdentityResult.Success; } diff --git a/backend/src/Squidex.Data.MongoDb/Infrastructure/BsonDomainIdSerializer.cs b/backend/src/Squidex.Data.MongoDb/Infrastructure/BsonDomainIdSerializer.cs index 63892db39..e2eaa1b0c 100644 --- a/backend/src/Squidex.Data.MongoDb/Infrastructure/BsonDomainIdSerializer.cs +++ b/backend/src/Squidex.Data.MongoDb/Infrastructure/BsonDomainIdSerializer.cs @@ -68,16 +68,7 @@ public sealed class BsonDomainIdSerializer : SerializerBase, IBsonPoly case BsonType.Binary: if (Guid.TryParse(value.ToString(), out var guid)) { -#pragma warning disable CS0618 // Type or member is obsolete - if (context.Writer.Settings.GuidRepresentation == GuidRepresentation.CSharpLegacy) - { - context.Writer.WriteBinaryData(new BsonBinaryData(guid.ToByteArray(), BsonBinarySubType.UuidLegacy, GuidRepresentation.CSharpLegacy)); - } - else - { - context.Writer.WriteBinaryData(new BsonBinaryData(guid, GuidRepresentation.Standard)); - } -#pragma warning restore CS0618 // Type or member is obsolete + context.Writer.WriteBinaryData(new BsonBinaryData(guid, GuidRepresentation.Standard)); } else { diff --git a/backend/src/Squidex.Data.MongoDb/Infrastructure/MongoClientFactory.cs b/backend/src/Squidex.Data.MongoDb/Infrastructure/MongoClientFactory.cs deleted file mode 100644 index d3ddc1817..000000000 --- a/backend/src/Squidex.Data.MongoDb/Infrastructure/MongoClientFactory.cs +++ /dev/null @@ -1,37 +0,0 @@ -// ========================================================================== -// Squidex Headless CMS -// ========================================================================== -// Copyright (c) Squidex UG (haftungsbeschraenkt) -// All rights reserved. Licensed under the MIT license. -// ========================================================================== - -using MongoDB.Driver; -using MongoDB.Driver.Linq; -using Squidex.Infrastructure.Json.Objects; - -namespace Squidex.Infrastructure; - -public static class MongoClientFactory -{ - public static MongoClient Create(string? connectionString, Action? configure = null) - { - BsonDefaultConventions.Register(); - BsonDomainIdSerializer.Register(); - BsonEscapedDictionarySerializer.Register(); - BsonInstantSerializer.Register(); - BsonJsonValueSerializer.Register(); - BsonStringSerializer.Register(); - - var clientSettings = MongoClientSettings.FromConnectionString(connectionString); - - // The current version of the linq provider has some issues with base classes. -#pragma warning disable CS0618 // Type or member is obsolete - clientSettings.LinqProvider = LinqProvider.V2; -#pragma warning restore CS0618 // Type or member is obsolete - - // If we really need custom config. - configure?.Invoke(clientSettings); - - return new MongoClient(clientSettings); - } -} diff --git a/backend/src/Squidex.Data.MongoDb/Infrastructure/MongoExtensions.cs b/backend/src/Squidex.Data.MongoDb/Infrastructure/MongoExtensions.cs index 7d929ddd8..2a3801771 100644 --- a/backend/src/Squidex.Data.MongoDb/Infrastructure/MongoExtensions.cs +++ b/backend/src/Squidex.Data.MongoDb/Infrastructure/MongoExtensions.cs @@ -168,11 +168,6 @@ public static class MongoExtensions var (key, snapshot, _, oldVersion) = job; try { - Expression> filter2 = - oldVersion > EtagVersion.Any ? - x => x.DocumentId.Equals(key) && x.Version == oldVersion : - x => x.DocumentId.Equals(key); - var filter = filters.Eq(x => x.DocumentId, key); if (oldVersion > EtagVersion.Any) diff --git a/backend/src/Squidex.Data.MongoDb/MongoClientFactory.cs b/backend/src/Squidex.Data.MongoDb/MongoClientFactory.cs new file mode 100644 index 000000000..32089269d --- /dev/null +++ b/backend/src/Squidex.Data.MongoDb/MongoClientFactory.cs @@ -0,0 +1,59 @@ +// ========================================================================== +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex UG (haftungsbeschraenkt) +// All rights reserved. Licensed under the MIT license. +// ========================================================================== + +using System.Text.Json; +using MongoDB.Bson; +using MongoDB.Driver; +using Squidex.Domain.Apps.Entities; +using Squidex.Domain.Apps.Entities.Assets; +using Squidex.Domain.Apps.Entities.Contents; +using Squidex.Domain.Apps.Entities.Contents.Text; +using Squidex.Domain.Apps.Entities.History; +using Squidex.Domain.Apps.Entities.MongoDb; +using Squidex.Domain.Users; +using Squidex.Infrastructure; +using Squidex.Infrastructure.Json.Objects; + +namespace Squidex; + +public static class MongoClientFactory +{ + public static void SetupSerializer(JsonSerializerOptions jsonSerializerOptions, BsonType representation) + { + // Register the serializers first. + BsonDomainIdSerializer.Register(); + BsonEscapedDictionarySerializer.Register(); + BsonInstantSerializer.Register(); + BsonJsonValueSerializer.Register(); + BsonStringSerializer.Register(); + BsonUniqueContentIdSerializer.Register(); + BsonJsonConvention.Register(jsonSerializerOptions, representation); + + // Keep the order, because we have an inheritance between entities. + MongoEntityClassMap.RegisterClassMap(); + MongoAppEntityClassMap.RegisterClassMap(); + MongoAssetItemClassMap.RegisterClassMap(); + MongoAssetEntity.RegisterClassMap(); + MongoAssetFolderEntity.RegisterClassMap(); + MongoContentEntity.RegisterClassMap(); + MongoHistoryClassMap.RegisterClassMap(); + MongoIdentityClassMap.RegisterClassMap(); + MongoTextStateClassMap.RegisterClassMap(); + + BsonDefaultConventions.Register(); + } + + public static MongoClient Create(string? connectionString, Action? configure = null) + { + var clientSettings = MongoClientSettings.FromConnectionString(connectionString); + + // If we really need custom config. + configure?.Invoke(clientSettings); + + return new MongoClient(clientSettings); + } +} diff --git a/backend/src/Squidex.Data.MongoDb/ServiceExtensions.cs b/backend/src/Squidex.Data.MongoDb/ServiceExtensions.cs index e41e89e89..335c436ec 100644 --- a/backend/src/Squidex.Data.MongoDb/ServiceExtensions.cs +++ b/backend/src/Squidex.Data.MongoDb/ServiceExtensions.cs @@ -70,7 +70,8 @@ public static class ServiceExtensions services.AddSingletonAs(c => { var options = c.GetRequiredService>(); - var mongoClient = GetMongoClient(config, "eventStore:mongoDb"); + + var mongoClient = GetMongoClient(config, c.GetRequiredService(), "eventStore:mongoDb"); var mongoDatabase = mongoClient.GetDatabase(mongoDatabaseName); return new MongoEventStore(mongoDatabase, options); @@ -85,7 +86,7 @@ public static class ServiceExtensions services.AddMongoAssetStore(c => { - var mongoClient = GetMongoClient(config, "assetStore:mongoDb"); + var mongoClient = GetMongoClient(config, c.GetRequiredService(), "assetStore:mongoDb"); var mongoDatabase = mongoClient.GetDatabase(mongoDatabaseName); return new GridFSBucket(mongoDatabase, new GridFSBucketOptions @@ -105,7 +106,7 @@ public static class ServiceExtensions return GetDatabase(c, mongoDatabaseName); }); - services.AddSingletonAs(c => GetMongoClient(config, "store:mongoDb")) + services.AddSingletonAs(c => GetMongoClient(config, c.GetRequiredService(), "store:mongoDb")) .As(); services.AddSingletonAs(c => GetDatabase(c, mongoDatabaseName)) @@ -288,19 +289,24 @@ public static class ServiceExtensions .As(); } - private static IMongoClient GetMongoClient(IConfiguration config, string prefix) + private static IMongoClient GetMongoClient(IConfiguration config, JsonSerializerOptions serializerOptions, string prefix) { + var representation = config.GetValue("store:mongoDB:valueRepresentation"); + var mongoConfiguration = config.GetRequiredValue($"{prefix}:configuration")!; var mongoCertificate = config.GetValue($"{prefix}:certificate"); + var cacheKey = $"{mongoConfiguration}_{mongoCertificate}"; return Singletons.GetOrAdd(cacheKey, _ => { + MongoClientFactory.SetupSerializer(serializerOptions, representation); + return MongoClientFactory.Create(mongoConfiguration, settings => { if (!string.IsNullOrWhiteSpace(mongoCertificate)) { - var certFile = new X509Certificate2(mongoCertificate); + var certFile = X509CertificateLoader.LoadCertificateFromFile(mongoCertificate); settings.SslSettings = new SslSettings { diff --git a/backend/src/Squidex.Data.MongoDb/Squidex.Data.MongoDb.csproj b/backend/src/Squidex.Data.MongoDb/Squidex.Data.MongoDb.csproj index e9a848d19..23ae20754 100644 --- a/backend/src/Squidex.Data.MongoDb/Squidex.Data.MongoDb.csproj +++ b/backend/src/Squidex.Data.MongoDb/Squidex.Data.MongoDb.csproj @@ -1,6 +1,6 @@  - net8.0 + net10.0 Squidex latest enable @@ -16,25 +16,24 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + - - - - - - - + + + + + + + - - + + diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj b/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj index 849260ad2..065b99192 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj @@ -1,6 +1,6 @@  - net8.0 + net10.0 Squidex.Domain.Apps.Core latest enable @@ -12,17 +12,16 @@ True - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + - + - diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/JsonTypeVisitor.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/JsonTypeVisitor.cs index aedbb2640..be9c9f865 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/JsonTypeVisitor.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/JsonTypeVisitor.cs @@ -5,6 +5,7 @@ // All rights reserved. Licensed under the MIT license. // ========================================================================== +using System.Globalization; using NJsonSchema; using Squidex.Domain.Apps.Core.Contents; using Squidex.Domain.Apps.Core.Schemas; @@ -140,7 +141,7 @@ internal sealed class JsonTypeVisitor : IFieldVisitor AssetContentUrl(FluidValue input, FilterArguments arguments, TemplateContext context) @@ -70,7 +70,7 @@ public sealed class EventFluidExtensions(IUrlGenerator urlGenerator) : IFluidExt return new StringValue(result); } - return NilValue.Empty; + return EmptyValue.Instance; } var value = input.ToObjectValue(); @@ -91,7 +91,7 @@ public sealed class EventFluidExtensions(IUrlGenerator urlGenerator) : IFluidExt } } - return NilValue.Empty; + return EmptyValue.Instance; } private ValueTask AssetContentSlugUrl(FluidValue input, FilterArguments arguments, TemplateContext context) @@ -105,7 +105,7 @@ public sealed class EventFluidExtensions(IUrlGenerator urlGenerator) : IFluidExt return new StringValue(result); } - return NilValue.Empty; + return EmptyValue.Instance; } var value = input.ToObjectValue(); @@ -123,6 +123,6 @@ public sealed class EventFluidExtensions(IUrlGenerator urlGenerator) : IFluidExt } } - return NilValue.Empty; + return EmptyValue.Instance; } } diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintScriptEngine.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintScriptEngine.cs index 7feb363c7..8ad87b9a6 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintScriptEngine.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/JintScriptEngine.cs @@ -54,7 +54,7 @@ public sealed class JintScriptEngine(IMemoryCache cache, IOptions JsonMapper.Map(result)); } @@ -102,7 +102,7 @@ public sealed class JintScriptEngine(IMemoryCache cache, IOptions data); } @@ -182,6 +182,13 @@ public sealed class JintScriptEngine(IMemoryCache cache, IOptions ExecuteAsync(ScriptExecutionContext context, string script) + { + var parsed = parser.Parse(script); + + return context.EvaluateAsync(parsed); + } + private static Exception MapException(Exception inner) { static Exception BuildException(string errorKey, string message, Exception? inner = null) diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptExecutionContext.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptExecutionContext.cs index 536b10223..c83f71875 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptExecutionContext.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptExecutionContext.cs @@ -18,6 +18,8 @@ public abstract class ScriptExecutionContext(Engine engine) : ScriptVars public abstract JsValue Evaluate(Prepared