An open API service indexing awesome lists of open source software.

https://github.com/gowon/gofer

Gofer is a simple database migration utility.
https://github.com/gowon/gofer

database dotnet migrations sql

Last synced: 2 months ago
JSON representation

Gofer is a simple database migration utility.

Awesome Lists containing this project

README

          

# gofer

Gofer is a simple database migration CLI utility.

## Usage

### Create

```shell
create:
Create a database

Usage:
gofer create [options]

Arguments:
Specify the name of the database to be created

Options:
-c, --connection-string Specify SQL Server connection string
-f, --force Force delete of database if it already exists
-v, --verbosity Set output verbosity [default: Warning]

-?, -h, --help Show help and usage information
```

### Migrate

```shell
migrate:
Perform database migrations

Usage:
gofer migrate [options] []

Arguments:
Path to migration scripts (leave blank for current directory)

Options:
-c, --connection-string Specify SQL Server connection string
-d, --dryrun Perform a dry-run instead of executing migration scripts
-j, --journal Specify journal schema and name [default:
dbo._MigrationJournal]
-l, --limit Specify a limit on the amount of scripts to execute from
the current position in the migration journal. A
negative number will run all but N
-o, --output Specify custom path for the HTML report
-p, --pretend Journal scripts without actually executing content
-r, --report Generate an HTML report of the scripts to be executed
during the migration
-v, --verbosity Set output verbosity [default: Warning]

-?, -h, --help Show help and usage information

```

## Dependencies

The following libraries are used in this tool:

- [System.CommandLine](https://github.com/dotnet/command-line-api)
- [DbUp](https://github.com/DbUp/DbUp)
- [MediatR](https://github.com/jbogard/MediatR)
- [Serilog](https://github.com/serilog/serilog)

## License

MIT