{"repo":"VladimirRybalko/CSharpMongoMigrations","free":true,"listed":false,"github":"https://github.com/VladimirRybalko/CSharpMongoMigrations","clone":"git clone https://github.com/VladimirRybalko/CSharpMongoMigrations.git","description":"CSharp migrations tool for MongoDb","language":"C#","stars":28,"topics":["mongodb","mongodb-driver","csharp","dotnet","mongo-migrator","migrations","netstandard20"],"license":"MIT","category":"data-pipelines","readme_excerpt":"CSharpMongoMigrations What is it? CSharpMongoMigrations is an alternative .NET library for MongoDB migrations. Unlike the official package, it supports both Up and Down migrations, which can be a significant advantage for large-scale MongoDB projects. In addition, it has no dependencies on outdated MongoDB drivers, so there's no need to manage multiple driver versions anymore. Documentation API Generally, there are four main types of migrations: 1) Common migration In this example, we define the Up migration to add John Doe to the Person collection. The Down method rolls back the migration, restoring the database to its original state. Take note of the Migration attribute — it's required for the migration to be executed by the launcher. You must specify a unique migration number (e.g., '0' ) and provide a descriptive label (e.g., 'Add John Doe' ). 2) Document migration These migrations allow to apply changes to each document in the specified collection. 3) Collection migration These migrations allow to apply changes to each collection separately from another ones. Here, the Migration attribute specifies the target collection name and the migration version for a predefined collection. This enables migrations to be applied to a specific schema. 4) Conditional migration These migrations can be conditionally skipped based on predefined criteria. For more in-depth examples, check out the CSharpMongoMigrations.Demo project. How to launch migrations? It’s actually quite simple: just","default_branch":null,"files":null,"tree":[],"storefront":"/r/VladimirRybalko","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/VladimirRybalko/CSharpMongoMigrations/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}