No project description provided
Project description
Handle database migrations with ease managing your database changes with simple SQL files. Make the migration process easier, more manageable and repeteable.
How does this work
Installation
pip install migrateit
Configuration
Configurations can be changed as environment variables.
# basic configuration
MIGRATIONS_TABLE=MIGRATEIT_CHANGELOG
MIGRATIONS_DIR=migrateit
# database configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=postgres
DB_USER=postgres
DB_PASS=postgres
Usage
# initialize MigrateIt to create:
# - migrations table
# - migrations directory
# - migrations changelog
migrateit init
# create a new migration file
migrateit newmigration first_migration
# add your sql commands to the migration file
echo "CREATE TABLE test (id SERIAL PRIMARY KEY, name VARCHAR(50));" > migrateit/0001_first_migration.sql
# show pending migrations
migrateit showmigrations
# run the migrations
migrateit migrate
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
migrateit-0.1.0.tar.gz
(8.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
migrateit-0.1.0-py3-none-any.whl
(10.7 kB
view details)
File details
Details for the file migrateit-0.1.0.tar.gz.
File metadata
- Download URL: migrateit-0.1.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
becd67059b9d58cbc4c71758df1c11ef2f45bd41661f8806bb7b26eb981d5294
|
|
| MD5 |
b61817f939cd414a63d91e936f8759a6
|
|
| BLAKE2b-256 |
d243cb7cb1fe46fa0316c8c35057840075b23f39b8f0feaea3ce4ec4096a5655
|
File details
Details for the file migrateit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: migrateit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5139867ca0cdda4d68df357ab2385e8afdd70f15f0dc99909ad5bcd7757a2149
|
|
| MD5 |
02f4bf148067265d9d60e634b38607b5
|
|
| BLAKE2b-256 |
4592934d8b4ab4c444decbb386149cd28d3fcf8d7a67bb72275f1a12739ee97a
|