Header menu logo Migrondi

Migrondi.json

To be able to use this tool you need to supply a JSON configuration file named migrondi.json this file can be on the root of your project or in a dedicated directory such as migrations.

{
  "connection": "Data Source=./migrondi.db",
  "migrations": "./migrations",
  "tableName": "__migrondi_migrations",
  "driver": "sqlite"
}

SQLite Path Resolution

When using SQLite with a relative connection string (e.g., "Data Source=./migrondi.db"), Migrondi automatically resolves the database path relative to the root directory:

{
  "connection": "Data Source=./migrondi.db",
  "migrations": "./migrations",
  "driver": "sqlite"
}

If the root directory is /my/app, the database path will be resolved to /my/app/migrondi.db. This allows your project to be portable across different machines.

Absolute paths are left unchanged.

Environment Variables and CLI options

The following environment variables can be used to configure migrondi:

You can pass the options via the CLI:

For example:

migrondi --driver sqlite --connection "Data Source=./migrondi.db" up --dry

*NOTE*: The configuration flags MUST be passed before the command, otherwise they will be interpreted as arguments for the command and will fail.

The priority of the configuration is as follows (last one wins):

migrondi.json < Environment variables < CLI options

Type something to start searching.