Script generation broken for EF 6.4.4 with dotconnect for Oracle part II
Posted: Tue 28 Sep 2021 15:10
Hello,
I am using Devart.Data.Oracle.EF6 9.14.1273 with EntityFramework 6.4.4 running on .Net 5. I use code first migrations with Oracle 12C. Since it has a 30 char limitation, I use
I face some trouble when dropping foreign keys. The SQL generated often does not match the foreign keys in the database.
But today I realized that the problem is deeper: When I generate a sql script using the -script option, I end up with a new constraint name on every run:
I could not find a way to explicitly specify a name for the foreign key.
This is blocking me at the moment, since I have a setup that is relying on the migrations to work. Do you have any solution or workaround for this?
Any help is welcome
Kind regards
Peter
I am using Devart.Data.Oracle.EF6 9.14.1273 with EntityFramework 6.4.4 running on .Net 5. I use code first migrations with Oracle 12C. Since it has a 30 char limitation, I use
Code: Select all
var config = OracleEntityProviderConfig.Instance;
config.CodeFirstOptions.TruncateLongDefaultNames = true;
But today I realized that the problem is deeper: When I generate a sql script using the -script option, I end up with a new constraint name on every run:
Code: Select all
ALTER TABLE ARIANE_ADMIN.REPORT_VERSION_TO_TARGET_APP
ADD CONSTRAINT FK_N181954248 FOREIGN KEY (BOX_ID, BOX_VERSION_NO) REFERENCES ARIANE_ADMIN.REPORT_VERSIONS (BOX_ID, BOX_VERSION_NO)
ON DELETE CASCADE
Code: Select all
ALTER TABLE ARIANE_ADMIN.REPORT_VERSION_TO_TARGET_APP
ADD CONSTRAINT FK_N1552352547 FOREIGN KEY (BOX_ID, BOX_VERSION_NO) REFERENCES ARIANE_ADMIN.REPORT_VERSIONS (BOX_ID, BOX_VERSION_NO)
ON DELETE CASCADE
Code: Select all
ALTER TABLE ARIANE_ADMIN.REPORT_VERSION_TO_TARGET_APP
ADD CONSTRAINT FK_393048484 FOREIGN KEY (BOX_ID, BOX_VERSION_NO) REFERENCES ARIANE_ADMIN.REPORT_VERSIONS (BOX_ID, BOX_VERSION_NO)
ON DELETE CASCADE
This is blocking me at the moment, since I have a setup that is relying on the migrations to work. Do you have any solution or workaround for this?
Any help is welcome
Kind regards
Peter