Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peopledoc/django-north
Django library for managing and executing hand-written PostgreSQL migrations
https://github.com/peopledoc/django-north
approved-public django ghec-mig-migrated peopledoc-opensource python tribe-python
Last synced: 17 days ago
JSON representation
Django library for managing and executing hand-written PostgreSQL migrations
- Host: GitHub
- URL: https://github.com/peopledoc/django-north
- Owner: peopledoc
- License: mit
- Created: 2017-03-13T08:54:26.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-26T20:29:35.000Z (about 2 years ago)
- Last Synced: 2024-11-10T16:28:00.036Z (about 2 months ago)
- Topics: approved-public, django, ghec-mig-migrated, peopledoc-opensource, python, tribe-python
- Language: Python
- Homepage:
- Size: 274 KB
- Stars: 9
- Watchers: 34
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
============
Django North
============.. image:: https://badge.fury.io/py/django-north.png
:target: https://pypi.org/pypi/django-north.. image:: https://travis-ci.org/peopledoc/django-north.png?branch=master
:target: https://travis-ci.org/peopledoc/django-north.. image:: https://readthedocs.org/projects/django-north/badge/
:target: http://django-north.readthedocs.io/en/latest/.. image:: https://img.shields.io/codecov/c/github/peopledoc/django-north/master.svg
:target: https://codecov.io/github/peopledoc/django-north?branch=masterDjango library for managing and executing hand-written PostgreSQL migrations.
Let your favorite DBAs define the database schema, and provide blue/green
migration files. Drop django native migrations, and use DBA's migrations
everywhere.Requirements
------------+ **Postgresql only**
+ Django v1.11, v2.0, v2.1, v2.2
+ Running under Python 3.6, 3.7 or 3.8Documentation
-------------The full documentation is at https://django-north.readthedocs.org.
Quickstart
----------Install Django North::
pip install django-north
In your ``settings.py`` :
.. code-block:: python
INSTALLED_APPS = [
# ...
"django_north",
]NORTH_MANAGE_DB = True
NORTH_MIGRATIONS_ROOT = '/path/to/sql/migrations/'
NORTH_TARGET_VERSION = '1.42'Running Tests
--------------You will need a usable Postgresql database in order to test the project. For example:
::
source /bin/activate
export DATABASE_URL=postgres://USER:PASSWORD@HOST:PORT/NAME
(myenv) $ pip install -r requirements_test.txtRun tests for a specific version
::
(myenv) $ ./runtest
Run tests for all versions (if tox is installed globally, you don't need a
virtual environment)::
$ tox
Using the project
-----------------Many operations are documented in the Makefile. For more information, use:
::
$ make help
Credits
---------Tools used in rendering this package:
* Cookiecutter_
* `cookiecutter-djangopackage`_.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage