Package: django-north
Django 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.RequirementsPostgresql onlyDjango v1.11, v2.0, v2.1, v2.2Running under Python 3.6, 3.7 or 3.8DocumentationThe full documentation is athttps://django-north.readthedocs.org.QuickstartInstall Django North:pip install django-northIn yoursettings.py:INSTALLED_APPS=[# ..."django_north",]NORTH_MANAGE_DB=TrueNORTH_MIGRATIONS_ROOT='/path/to/sql/migrations/'NORTH_TARGET_VERSION='1.42'Running TestsYou will need a usable Postgresql database in order to test the project. For example:source <YOURVIRTUALENV>/bin/activate
export DATABASE_URL=postgres://USER:PASSWORD@HOST:PORT/NAME
(myenv) $ pip install -r requirements_test.txtRun tests for a specific version(myenv) $ ./runtestRun tests for all versions (if tox is installed globally, you don’t need a
virtual environment)$ toxUsing the projectMany operations are documented in the Makefile. For more information, use:$ make helpCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.3.2 (2022-02-07)Add Django 3 compatibilityAdd Github actionsFix settings initializationPin pytest_django version to solve a known multidb issueAdd postgres docker containerPin psycopg2 version to fix utc issue due to incompatible types0.3.1 (2020-07-24)Fix septentrion call in runserverBump to septentrion 0.6.10.3.0 (2020-07-24)Remove setting “NORTH_DISCARD_ALL”Add function for septentrion settingsFix classifiersRemoved the internal logic for applying migrations, use septentrion instead.0.2.6 (2019-10-25)Add support for Django 2.2NORTH_AFTER_SCHEMA_FILESandNORTH_BEFORE_SCHEMA_FILEScan now accept glob string.0.2.5 (2019-01-22)Add support for Django 2.1 & Python 3.7Add settingNORTH_AFTER_SCHEMA_FILESfor schema files after the main schema.Adding settingNORTH_BEFORE_SCHEMA_FILES, to replaceNORTH_ADDITIONAL_SCHEMA_FILES.Deprecate settingNORTH_ADDITIONAL_SCHEMA_FILES.0.2.4 (2018-09-12)Use–databaseoption to determine which database to use in migrate command (#35)0.2.3 (2018-06-15)Add support for Django 2.0 (#31)Add a “DISCARD ALL” command run at the end of each script. It adds a new settings variable:NORTH_DISCARD_ALL(#33)0.2.2 (2018-02-01)Flush command: do not flush migration tables.0.2.1 (2018-01-29)AddVACUUMtoNORTH_NON_TRANSACTIONAL_KEYWORDSdefault settings.Add a settingNORTH_SCHEMA_VERSIONto force the schema to be used to init a DB.0.2.0 (2017-10-16)Backport thesqlallcommand.Sanitize sql statements for SimpleBlock.0.1.8 (2017-09-20)Detect manual files if not stored in the ‘manual’ dir.Fix unicode error with SimpleBlock0.1.7 (2017-09-06)Fixget_applied_versionsresult ordering.0.1.6 (2017-09-05)Add tests for Django 1.11.0.1.5 (2017-05-24)Fix showfixtures command for Django 1.10.0.1.4 (2017-05-10)Do not fail if fixtures do not exist.
Use the closest fixtures for DB init and flush command.Add support of python3.0.1.3 (2017-04-18)Use a Block if the sql file contains a ‘ALTER TYPE’ instruction
Add a setting to customize the files to run in a Block.0.1.2 (2017-04-13)Use a Block if the sql file contains a CONCURRENTLY instruction.0.1.1 (2017-04-11)Add the possibility to configure the current version detector.0.1.0 (2017-03-28)First release on PyPI.