Skip to main content

Liquibase migrations with django

Project description

https://pypip.in/v/liquimigrate/badge.png https://pypip.in/d/liquimigrate/badge.png

Overview

  • 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.4.1.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

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

liquimigrate-0.4.1-py2-none-any.whl (1.7 MB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for liquimigrate-0.4.1.tar.gz
Algorithm Hash digest
SHA256 e2e924a6d02c108e54c0beba7c32c0caf1cb1ab9c6e8e3572d21737920e921aa
MD5 0447305830ed8e4ae71d0640d69b19ae
BLAKE2b-256 92e0cf35929d0009015d00850d659307746e22686d1ce13c438684619f86b78e

See more details on using hashes here.

File details

Details for the file liquimigrate-0.4.1-py2-none-any.whl.

File metadata

File hashes

Hashes for liquimigrate-0.4.1-py2-none-any.whl
Algorithm Hash digest
SHA256 e9408a59a380deceeacc53d3e26673a2cf0b5baf547d60fa5808fa8e5857b5b0
MD5 270a4822bbb9b3a72d9265427b41827f
BLAKE2b-256 1afe4f160af4201328ecb5cb31ddf63414189f44f6aced62ae0d9d5448c3ff9b

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