A DRY multi-database migration tool.
Project description
Database Versioner (dbv)
Database versioner to be used to version Postgres & Redshift
Features
- Able to run db migrations in a single command
- Manages current version of the database
- Able to randomize password and store in AWS SSM
- Useful for CICD deployments
- Better than sharing data dump exports
Installation
This is a python module available through the pypi registry.
Before installing, download and install python. python 3 or higher is required.
Installation is done using the
pip install
command:
$ pip install syngenta_digital_dbv
or
$ pipenv install syngenta_digital_dbv
Basic Usage
Postgres/Redshift
import syngenta_digital_dbv
def some_func():
syngenta_digital_dbv.version(
engine='postgres',
endpoint='localhost',
database='dbv-postgis',
port=5433,
user='root',
password='Lq4nKg&&TRhHv%7z',
ssm_param='local-postgres-config',
versions_directory='application/db_versions/version_number_files',
reset_root=True
)
Option Name | Required | Type | Description |
---|---|---|---|
engine |
true | string | name of supported db engine (postgres) |
endpoint |
true | string | url of your host db |
database |
true | string | name of the database to connect to |
port |
true | int | port of database (no defaults) |
user |
true | string | root username for database access |
password |
true | string | root password for database access |
versions_directory |
true | string | directory where all you files can be found |
ssm_param |
false | string | ssm param path you want to store your db configs |
reset_root |
false | boolean | whether to reset the root password; will ignore if ssm_param not defined |
seed |
false | boolean | whether to seed data (great for local development) |
seed_directory |
false | string | directory where all you files can be found |
NOTE: File names must be unique and in order (i.e. 1.sql, 2.sql, etc or a.sql, b.sql, etc), this is how the package knows what order to run the files in
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
Built Distribution
Close
Hashes for syngenta_digital_dbv-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73af804b59764f3b0215cdd648fbda7f2b733033b5281a5d24aa8f8a43cecf8b |
|
MD5 | a0cf0dd61b6232809c327069401dec6d |
|
BLAKE2b-256 | 628206e6e5a238eadc03a29ce1fa02c3d633b61a37b3c397f60f69ee91b333eb |
Close
Hashes for syngenta_digital_dbv-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0283f79a5e624a1241088b0c8dd9176682d6069a203dc937bfaaf7d4c2a5af41 |
|
MD5 | 04d578f9e8d3038d6abbba70964bb17c |
|
BLAKE2b-256 | bf9a63aeacc23805b239306b0dd86e074b86c41aabe484a3e745c17795691db5 |