- changed version to v2.0.0
How to use LookInAssemblyOfType<T>() of MigratiotionLocator
Hi! Could you provide example how to use LookInAssemblyOfType?
I am using MongoDBMigrations 2.0 Nuget Package
Comments (7)
-
repo owner -
repo owner Hello @Stepan Goremykin ,
Due to the method, ` LookInAssemblyOfType` became deprecated, you should use the methodUseAssemblyOfType
in brand new Fluent API instead.
E.g.new MigrationEngine().UseDatabase(connectionString, databaseName) .UseAssemblyOfType<T>() // or its overload UseAssemblyOfType(Type type) or method UseAssembly(Assembly assembly) .UseSchemeValidation(false) //or true if it needed. .Run(); // to update to the latest available version, or specify the target version in the argument.
Thanks for your interest in my package. I’ll update the documentation to make this moment more clear.
Don’t hesitate to ask me, if you have more questions.
-
repo owner - changed status to open
-
reporter @Arthur Osmokiesku , Thanks for answer! I think we need to change README.md
And could you explainUseSchemeValidation
option? When I passtrue
flag there, I get an exception about optional parameterpath
-
repo owner This function might be useful if you want to keep the same structure of all documents within a collection. This method analyzes the source code of migrations that will be applied to the database, grabs the list of collections that will be affected during the migration, and checks that documents have a consistent structure. If collection with inconsistent document structure found the exception will be raised. Currently, this feature doesn’t cover all possible cases and will be improved and a bit reworked in the nearest update.
-
reporter Thank you very much!
-
reporter - changed status to resolved
- Log in to comment