SimpleMigrator 2.0.2
There is a critical bug with `cassandra migrate down`. Upgrade to latest.
See the version list below for details.
dotnet tool install --global SimpleMigrator --version 2.0.2
dotnet new tool-manifest
dotnet tool install --local SimpleMigrator --version 2.0.2
#tool dotnet:?package=SimpleMigrator&version=2.0.2
nuke :add-package SimpleMigrator --version 2.0.2
Simple Migrator
Databases Supported
- Postgres
- Cassandra
- Neo4j
- Mongo
Usage
Migration files are executed in order, so a date-related naming convention is recommended, but not required. See the example migrations folder.
File extension names are ignored, so feel free to use whatever suits your fancy.
Downward migration scripts must end in .down.<extension>, but are optional.
migrate postgres up|down \
--connection-string | -c <postgres connection string> \
--folder | -f <folder of migration files> \
[--to <migration name to stop at>]
migrate cassandra up|down \
--host | -h <cassandra hostname> \
--port | -p <cassandra port> \
--keyspace | -k <cassandra keyspace> \
--folder | -f <folder of migration files> \
[--to <migration name to stop at>]
migrate neo4j up|down \
--host | -h <neo4j hostname> \
--port | -p <neo4j port> \
--username | -u <neo4j username> \
--password | -w <neo4j password> \
--database | -d <neo4j database> \
--folder | -f <folder of migration files> \
[--to <migration name to stop at>]
migrate mongo up|down \
--connection-string | -c <mongo host connection string> \
--database | -d <mongo database> \
--folder | -f <folder of migration files> \
[--to <migration name to stop at>]
Postgres
The connection string must be an ADO.NET-compliant connection string. Executes SQL commands from files. All commands in a single file will be executed in a transaction.
Cassandra
Executes CQL queries from files. Only one command allowed per file.
Be careful how you write your migrations since this applies to downward migrations as well.
Warning: does not yet support username/password
Neo4j
Executes Cypher queries from files. Only one command allowed per file, though naturally queries that do multiple things are acceptable.
Be careful how you write your migrations since this applies to downward migrations as well.
Mongo
Executes JSON commands from files.
Contribution
While you have every right to fork this repo and run away with it, I would really appreciate issues, comments, and pull requests if you have them!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.