Skip to main content

Liquibase migrations with django

Project description

License: BSD Liquibase license: Apache 2.0 Author: Marek Wywiał <onjinx@gmail.com>

Quick start

  • install liquimigrate, python setup.py install

  • add ‘liquimigrate’ to INSTALLED_APPS

  • configure LIQUIMIGRATE_CHANGELOG_FILES = { ‘default’: os.path.join(os.path.dirname(__file__), “migrations”, “migrations.xml”) in settings }

  • ensure that you have java on your path, liquibase and java drivers are embedded into package

Usage

Just run ./management.py liquibase update or ./management.py liquibase -h

To learn how to use liquibase look at liquibase documentation:

Configuration settings

  • LIQUIMIGRATE_CHANGELOG_FILES - dictionary with paths to change log files f.e. ‘os.path.join(os.path.dirname(__file__), “migrations”, “migrations.xml”)’ for every database connection you need to maintain using liquimigrate

  • old method is still supported: LIQUIMIGRATE_CHANGELOG_FILE - path to change log file f.e. ‘os.path.join(os.path.dirname(__file__), “migrations”, “migrations.xml”)’

  • LIQUIMIGRATE_DATABASE - selected database - default ‘default’

How it works

Database settings are got from DATEBASES, from key ‘default’ or key configured in settings.py as LIQUIMIGRATE_DATABASE.

Changelog path are got from LIQUIMIGRATE_CHANGELOG_FILES or from command line (check -h).

Supported drivers:
  • postgresql

  • mysql

  • more in future

Development

Whole command code is put in:
  • liquimigrate/management/commands/liquibase.py

  • java connectors are stored in liquimigrate/vendor/connectors

  • available drivers mapping is stored in liquimigrate/__init__.py

  • mapping to create db url for drivers is stored in liquimigrate/management/commands/liquibase.py in DB_DEFAULTS

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liquimigrate-0.2.8.tar.gz (1.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

liquimigrate-0.2.8-py2.7.egg (1.7 MB view details)

Uploaded Egg

liquimigrate-0.2.8-py2.6.egg (1.7 MB view details)

Uploaded Egg

File details

Details for the file liquimigrate-0.2.8.tar.gz.

File metadata

  • Download URL: liquimigrate-0.2.8.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for liquimigrate-0.2.8.tar.gz
Algorithm Hash digest
SHA256 cfc4399c71bc90a857adc04ff1a7415866a7f4b9924f1db67efe52d3b0d3c88c
MD5 76ead0338ab908fd681e2aa97108157c
BLAKE2b-256 38114295557dc68005a03e53d6a3c2743880b149417ec4576fb2a16b718b1999

See more details on using hashes here.

File details

Details for the file liquimigrate-0.2.8-py2.7.egg.

File metadata

File hashes

Hashes for liquimigrate-0.2.8-py2.7.egg
Algorithm Hash digest
SHA256 8b5c7edd3afd397b18c1be3d0c0cc47cd3b93b2cbfb6c3ea9a6a1d783d7b1e19
MD5 782fd9170b7378b0a7a35c59d4c0c1bf
BLAKE2b-256 03138ff91e7461dceaf4d37be0f6baf46a7332c887043bca40a0a9df5110c236

See more details on using hashes here.

File details

Details for the file liquimigrate-0.2.8-py2.6.egg.

File metadata

File hashes

Hashes for liquimigrate-0.2.8-py2.6.egg
Algorithm Hash digest
SHA256 0bf3f8e17bca03d9773c4100ae93be83e0e627aee35366a5ce37cd2091f1bd0e
MD5 01ece22a58d4682f04c9556a553edc1f
BLAKE2b-256 86e9591119a98aa35e8b27d4cc4e4c103c3cdaf591ed0d99f7c3adcd65bb0e35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page