Skip to content

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

theatlantic/django-mysqlndb-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 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.

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': '',
    }
}

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages