Closed acblksun closed 5 years ago
Hi @acblksun,
OK, to summarise your problem is with the Schema name, which matches is you ignore case. Correct?
I am planning to look at EfSchemaCompare sometime soon as I have another feature change request. I suspect I will provide a general "ignore case on table and schema names" as the dictionaries contain the combined schema + tables names. That also handles issue #9.
I will leave this open to remind me.
Hi @JonPSmith
That's correct. The as-built schema is lowercase product
, but the EF ToTable
schema argument is Product
.
The casing for different schemas in this app is mixed. ie product
vs Purchase
, and as mentioned, there's never going to be a rebuild of production data.
Thanks again.
HI @acblksun,
I have just released version 2.0.0 where you can use case insensitive matching. See the CaseComparer
property in the CompareEfSqlConfig class.
I hope that helps you.
Hi @JonPSmith
That's great thanks! Just tried 2.0.0 and the new option works a treat.
Thanks again.
Hi @JonPSmith what is the replacement for CaseComparer when updating to version 5.3.0?
Hi @naama11,
I moved the CompareEfSql code into the EfCore.SchemaCompare library - see Release notes on 5.0.0 .
The EfCore.SchemaCompare library doesn't support CaseCompare because there was a problem occurred in EF Core 5, so the CaseComparer is turned off.
Hi,
We're finishing up a migration from EF6 to EF Core, and using CompareEfSql to validate the upgraded builder (especially the corner cases), and it's been a great tool to assist with this.
However we're having a small issue where the real schema was initially created all lowercase version, but the schema has since been changed to be pascal case. Further, either EF6 pascal cased the foreign key names, or perhaps another developer manually ignored the change when the schema was changed to pascal case.
The result is a mix of
schema.Table
andFK_Schema_ColumnId
that is perfectly legal for Sql Server, and EF Core. The updated configuration works without errors.I realize we can just ignore these errors individually, but as with https://github.com/JonPSmith/EfCore.TestSupport/issues/9 it would be great to add a case-insensitive option when comparing schema (and/or table).
but once ignored, we then get the reverse error
We would like it if the following does not fail
Thanks again for the great tool!