Metadata-Version: 2.1
Name: migro
Version: 0.2.0
Summary: Data Warehouse migrations for dbt.
Home-page: https://github.com/troyharvey/migro
Author: Troy Harvey
Author-email: troyharvey@gmail.com
License: MIT
Platform: UNKNOWN
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Click
Requires-Dist: Jinja2
Requires-Dist: psycopg2
Requires-Dist: pyyaml
Requires-Dist: snowflake-connector-python
Requires-Dist: sqlparse
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'

# migro

Data Warehouse migrations for dbt.

[![tests](https://github.com/troyharvey/migro/actions/workflows/pytest.yml/badge.svg)](https://github.com/troyharvey/migro/actions)
[![codecov](https://codecov.io/gh/troyharvey/migro/branch/main/graph/badge.svg?token=TU861V5K46)](https://codecov.io/gh/troyharvey/migro)
[![lint](https://github.com/troyharvey/migro/actions/workflows/flake8.yml/badge.svg)](https://github.com/troyharvey/migro/actions)

## Setup

1. Install `migro` in a [dbt](https://getdbt.com) project.

        pip install migro

1. Create a migration. For example:

        mkdir migrations
        migro make create_bobby_tables_user

1. Open the sql file in the `migrations` folder and add this statement.

        create user bobby_tables with password '{{ password }}';

1. Pretend to run the migration. Notice the password generated by the `{{ password }}` jinja template.

        migro up --pretend --limit=1

1. Now run the migration.

        migro up

1. Query the new migrations table to see the migration history.

        select * from public.migrations order by id;

## Data Warehouse Support

* [Redshift](https://aws.amazon.com/redshift/)
* [Snowflake](https://www.snowflake.com)


