Simple SQL migration tool for SQLite and PostgreSQL
Project description
# Migranto
Simple SQL migration tool for SQLite and PostgreSQL
## Instalation
pip install migranto
## Migrations
All migrations exist in one directory with names like:
0001_some_useful_name.sql
0001_some_useful_name_rollback.sql
0002_some_other_useful_name.sql
0002_some_other_useful_name_rollback.sql
Migranto checks migrations directory and apply sql files to database.
That's it. Simple enough.
## Usage:
`./migranto [-h] --database URL [--storage NAME] [--name NAME] `
shows migrations status
`./migranto [-h] --database URL --name NAME --path PATH [--migration N] [--storage NAME] [--verbose] [--fake] [--out] `
* __--help, -h__ — show this help message and exit
* __--database URL, -d URL__ — database url (pgsql://user:password@host:port/dbname or sqlite://path/to/data.base)
* __--name NAME, -n NAME__ — migration set name
* __--path PATH, -p PATH__ — path to migrations dir
* __--migration N, -m N__ — migration step (last migration if omitted, 0 - before first migration)
* __--storage NAME, -s NAME__ — migranto table name for data (default is migranto)
* __--verbose, -v__ — verbose mode
* __--out, -o__ — output sql to standard output. nothing applied to database.
* __--fake, -f__ — fake migration (no sql applied to database, except migration number)
Simple SQL migration tool for SQLite and PostgreSQL
## Instalation
pip install migranto
## Migrations
All migrations exist in one directory with names like:
0001_some_useful_name.sql
0001_some_useful_name_rollback.sql
0002_some_other_useful_name.sql
0002_some_other_useful_name_rollback.sql
Migranto checks migrations directory and apply sql files to database.
That's it. Simple enough.
## Usage:
`./migranto [-h] --database URL [--storage NAME] [--name NAME] `
shows migrations status
`./migranto [-h] --database URL --name NAME --path PATH [--migration N] [--storage NAME] [--verbose] [--fake] [--out] `
* __--help, -h__ — show this help message and exit
* __--database URL, -d URL__ — database url (pgsql://user:password@host:port/dbname or sqlite://path/to/data.base)
* __--name NAME, -n NAME__ — migration set name
* __--path PATH, -p PATH__ — path to migrations dir
* __--migration N, -m N__ — migration step (last migration if omitted, 0 - before first migration)
* __--storage NAME, -s NAME__ — migranto table name for data (default is migranto)
* __--verbose, -v__ — verbose mode
* __--out, -o__ — output sql to standard output. nothing applied to database.
* __--fake, -f__ — fake migration (no sql applied to database, except migration number)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
migranto-0.1.9.tar.gz
(5.2 kB
view details)
File details
Details for the file migranto-0.1.9.tar.gz.
File metadata
- Download URL: migranto-0.1.9.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a1e851a625419c38138b94d4d8b6d885ac2f4d3c8b8a1e768b43883bb102821
|
|
| MD5 |
5b6ec0ff7dd91f14bc8b95ad809c19ea
|
|
| BLAKE2b-256 |
64683e5636d5d424989fe6c6060c949b7fff9448414632ef95bfe9f8f830fbd4
|