Metadata-Version: 2.4
Name: pogo-core
Version: 0.1.0
Summary: Database migration tool for asyncpg
Project-URL: homepage, https://github.com/NRWLDev/pogo-core
Project-URL: documentation, https://nrwldev.github.io/pogo-core/
Author-email: Daniel Edgecombe <daniel@nrwl.co>
Maintainer-email: Daniel Edgecombe <daniel@nrwl.co>
License-Expression: Apache-2.0
Keywords: asyncpg,database,migrate,migrations,yoyo
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Database
Classifier: Topic :: Software Development
Requires-Python: >=3.9
Requires-Dist: sqlglot>=25.19
Requires-Dist: sqlparse==0.5.2
Provides-Extra: dev
Requires-Dist: asyncpg>=0.29.0; extra == 'dev'
Requires-Dist: changelog-gen>=0.12; extra == 'dev'
Requires-Dist: pre-commit>=3.0.2; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.5; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest-env>=0.8.1; extra == 'dev'
Requires-Dist: pytest-random-order>=1.1.1; extra == 'dev'
Requires-Dist: pytest>=8.0.2; extra == 'dev'
Requires-Dist: ruff>=0.6.4; extra == 'dev'
Requires-Dist: ty>=0.0.4; extra == 'dev'
Description-Content-Type: text/markdown

# Pogo migrate core - asyncpg migration tooling
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![image](https://img.shields.io/pypi/v/pogo_core.svg)](https://pypi.org/project/pogo_core/)
[![image](https://img.shields.io/pypi/l/pogo_core.svg)](https://pypi.org/project/pogo_core/)
[![image](https://img.shields.io/pypi/pyversions/pogo_core.svg)](https://pypi.org/project/pogo_core/)
![style](https://github.com/NRWLDev/pogo-core/actions/workflows/style.yml/badge.svg)
![tests](https://github.com/NRWLDev/pogo-core/actions/workflows/tests.yml/badge.svg)
[![codecov](https://codecov.io/gh/NRWLDev/pogo-core/branch/main/graph/badge.svg)](https://codecov.io/gh/NRWLDev/pogo-core)

`pogo-core` is a migration tool intended for use with `asyncpg` and assists
with maintaining your database schema (and data if required) as it evolves.
Pogo supports migrations written in raw sql, as well as python files (useful
when data needs to be migrated).

A migration can be as simple as:

```sql
-- a descriptive message
-- depends: 20210101_01_abcdef-previous-migration

-- migrate: apply
CREATE TABLE foo (id INT, bar VARCHAR(20), PRIMARY KEY (id));

-- migrate: rollback
DROP TABLE foo;
```

Pogo manages these migration scripts and provides utility functions to apply
and rollback migrations.

For a user interface, install `pogo-migrate` instead.

See the [docs](https://nrwldev.github.io/pogo-migrate/) for more details.

## Thanks and Credit

Inspiration for this tool is drawn from
[yoyo](https://ollycope.com/software/yoyo/latest/) and
[dbmate](https://github.com/amacneil/dbmate).
