Open Closed

Running DBMigrator in a Machine with sql server 2012 #7232


User avatar
0
minalatifWDX created
  • ABP Framework version: v8.1.1

  • UI Type: Blazor Server

  • Database System: EF Core (SQL Server)

  • Tiered (for MVC) or Auth Server Separated (for Angular): no

  • Exception message and full stack trace: Failed executing DbCommand (6ms) [Parameters=[@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__organizationUnitIds_0='?' (Size = 4000)], CommandType='Text', CommandTimeout='30'] SELECT [a].[RoleId] FROM [AbpOrganizationUnitRoles] AS [a] INNER JOIN ( SELECT [a0].[Id], [a0].[Code], [a0].[ConcurrencyStamp], [a0].[CreationTime], [a0].[CreatorId], [a0].[DeleterId], [a0].[DeletionTime], [a0].[DisplayName], [a0].[EntityVersion], [a0].[ExtraProperties], [a0].[IsDeleted], [a0].[LastModificationTime], [a0].[LastModifierId], [a0].[ParentId], [a0].[TenantId] FROM [AbpOrganizationUnits] AS [a0] WHERE (@__ef_filter__p_2 = CAST(1 AS bit) OR [a0].[IsDeleted] = CAST(0 AS bit)) AND (@__ef_filter__p_0 = CAST(1 AS bit) OR [a0].[TenantId] IS NULL) ) AS [t] ON [a].[OrganizationUnitId] = [t].[Id] WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [a].[TenantId] IS NULL) AND [a].[OrganizationUnitId] IN ( SELECT [o].[value] FROM OPENJSON(@__organizationUnitIds_0) WITH ([value] uniqueidentifier '$') AS [o]

  • Steps to reproduce the issue: We are trying to run DBMigrator on a device with sql server 2012 as in attached images.


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-8.0/breaking-changes#mitigations

  • User Avatar
    0
    minalatifWDX created

    hi

    https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-8.0/breaking-changes#mitigations

    We Changed the compatibility_level in EFCore Configuration but the same error appears also we need to mention that the database is created with the new compatibility_level but with a lack in data seeding (like,,OpenIddictApplications)

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Try to configure AbpDbContextOptions as well.

    Configure<AbpDbContextOptions>(options =>
    {
        /* The main point to change your DBMS.
         * See also BookStoreMigrationsDbContextFactory for EF Core tooling. */
        options.UseSqlServer(x => x.UseCompatibilityLevel(120));
    });
    
Made with ❤️ on ABP v8.2.0-preview Updated on března 25, 2024, 15:11