0 Replies Latest reply on Sep 26, 2019 12:02 PM by 31c07350-bada-4691-ae39-0c5ef56be3b6

    Oracle.EntityFrameworkCore generates invalid idempotent migrations SQL


      Background: We are using Entity Framework (EF) Core version 2.2.6 with the NuGet package Oracle.EntityFrameworkCore version 2.19.30


      We are generating an idempotent migrations SQL script using the command line: dotnet ef migrations script --idempotent --output "Update-Database.sql"


      The SQL file is generated, but when we execute it using SQL*Plus then it shows many errors because the SQL is invalid.


      In particular, we have identified the following errors in the generated SQL:

      1. When it creates the __EFMigrationsHistory table then it raises the exception if the code is not 942.  Based on our environment, instead of 942 it should check against 955 instead.
      2. At the end of the SELECT COUNT(*) INTO v_Count FROM lines there should be a semicolon.
      3. At the end of the END IF and END lines there should be a semicolon.
      4. At the end of the INSERT INTO SQL there should be a semicolon.


      Please can you fix the NuGet package Oracle.EntityFrameworkCore and publish a new version with these fixes.  Thank you!