Giter VIP home page Giter VIP logo

efschemacompare's People

Contributors

jonpsmith avatar wtw-demid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

efschemacompare's Issues

Multiple foreign keys with different cascade delete actions produces unexpected errors

Hi.

Thank you for EfSchemaCompare.

If I have a database table with two foreign keys which have different cascade delete actions, CompareEfWithDb will return errors.

This is happening because when the cascade delete actions are checked, the code arbitrarily picks up the mismatched value, specifically for many-to-one and one-to-many relationships.

See

foreach (var foreignKey in foreignKeys.Where(foreignKey => relEfCol.FromToRelationships.ToIsCascadeDelete != foreignKey.IsCascade))

foreach (var foreignKey in foreignKeys.Where(foreignKey => relEfCol.FromToRelationships.FromIsCascadeDelete != foreignKey.IsCascade))

Nested classes support?

I've found that when a DbContext has mappings to a class in the same assembly, which is a nested class, then the comparer thinks the type is defined in another assembly.

Making the classes not nested is the obvious solution, but that would be... not easy.

Setting default schema same as database default schema results in incorrect comparison

Hi,

I ran into minor bug in EfCore.SchemaCompare 5.1.4 version (latest).

Setting default schema in DbContext to same value as default database schema (most likely dbo) results in incorrect comparison. This then most probably results in errors like NOT IN DATABASE: Entity 'Author', table name. Expected = dbo.Authors

Reproducing it is easy. Add modelBuilder.HasDefaultSchema("dbo"); to BookContext and most unit tests will fail.

The main issue is in methods that generates table names:

  • FormSchemaTableFromModel - generates dbo.Author because we had explicitly specified dbo schema
  • FormSchemaTableFromDatabase - generates Author because table.Schema == defaultSchema

varbinary cause TypeLoadException

Hi @JonPSmith
I have the following TypeLoadException

image

since I don't have resharper to run the unit tests, can you fix it?
I already tried as follow
image

but then it complains that the column is missing.
Not sure why

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.