Skip to content
This repository has been archived by the owner on Jun 15, 2018. It is now read-only.

Provides a django database backend that works with MySQL Cluster's NDB storage engine

License

Notifications You must be signed in to change notification settings

leaniot/django-mysqlndb-backend

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-mysqlndb-backend

django-mysqlndb-backend is a project that provides a django database backend that works with MySQL Cluster. The MySQL backend provided by django does not currently work with MySQL Cluster because of a bug in the handling of foreign key constructs. The backend provided in this module extends and overrides the behavior of django's MySQL database backend to suppress foreign key constraints in ALTER TABLE and CREATE TABLE constructs. It also includes a South backend for django apps using South for migrations.

Installation

The recommended way to install from source is with pip:

$ pip install -e git+git://github.com/theatlantic/django-mysqlndb-backend.git#egg=django-mysqlndb-backend

If the source is already checked out, use setuptools:

$ python setup.py install

Usage

When defining your database in settings.py, set ENGINE to 'mysqlndb' rather than 'django.db.backends.mysql' / 'mysql'.

DATABASES = {
    'default': {
        'OPTIONS': {
            'init_command': 'SET storage_engine=ndbcluster',
        },
        'ENGINE': 'mysqlndb',
        'NAME': 'database_name',
        'USER': 'root',
        'PASSWORD': '',
        'HOST': 'localhost',
        'PORT': '',
    }
}

# If south is included in INSTALLED_APPS, this is required:
SOUTH_DATABASE_ADAPTERS = {
    'default': 'mysqlndb.south_backend',
}

About

Provides a django database backend that works with MySQL Cluster's NDB storage engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%