Skip to main content

Redshift database backend for Django

Project description

This product is tested with:

  • python-2.7.x

  • django-1.7.6, 1.7.10, 1.8.8

Differences from postgres_psycopg2 backend

Type mapping:

  • ‘integer identity(1, 1)’ for AutoField

  • ‘timestamp’ for DateTimeField

  • ‘varchar(max)’ for TextField

  • Multiply 3 to VARCHAR length to support utf-8 string

Stop using:

  • RETURNING.

  • SELECT FOR UPDATE

  • SET TIME ZONE

  • INDEX

  • DEFERRABLE INITIALLY DEFERRED

  • CONSTRAINT

  • DROP DEFAULT

To support migration:

  • To add column to existent table on Redshift, column must be nullable

  • To support modify column, add new column -> data migration -> drop old column -> rename

Please note that the migration support for redshift is not perfect yet.

LICENSE

Apache Software License

CHANGES

0.3

  • #3: more compat with Redshift (AutoField, DateTimeField, Index). Thanks to Maxime Vdb.

  • More compat with redshift: add TextField

  • More compat with redshift: not use DEFERRABLE, CONSTRAINT, DROP DEFAULT

  • More compat with redshift: support modify column

0.2.1

  • “SET TIME_ZONE” warning is changed as debug log for ‘django.db.backend’ logger.

0.2

  • Disable “SET TIME_ZONE” SQL execution even if settings.TIME_ZONE is specified.

0.1.2

  • Support Django-1.8

0.1.1

  • Disable “SELECT FOR UPDATE” SQL execution.

0.1

  • Support Django-1.7

  • Support “INSERT INTO” SQL execution without “RETURNING” clause.

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

django-redshift-backend-0.3.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

django_redshift_backend-0.3-py2-none-any.whl (8.6 kB view details)

Uploaded Python 2

File details

Details for the file django-redshift-backend-0.3.tar.gz.

File metadata

File hashes

Hashes for django-redshift-backend-0.3.tar.gz
Algorithm Hash digest
SHA256 a581496a9005a54dd3624bff89a9ee3938bd4bd14bc4c1433a11af19c33a5ebb
MD5 733d3e433225f79c799c20931fe0437a
BLAKE2b-256 53a750ceb7dd7e74a2f76cad73b4f65698fc4d67d118f0c167279f7bc35c6e73

See more details on using hashes here.

File details

Details for the file django_redshift_backend-0.3-py2-none-any.whl.

File metadata

File hashes

Hashes for django_redshift_backend-0.3-py2-none-any.whl
Algorithm Hash digest
SHA256 fae380bf748998e9a9122ecdf584fa194420f1fa0554d1a274abd526ea3a7341
MD5 2ad8aea57dd9b7d08c082da22e4a7bce
BLAKE2b-256 f2d3f5d06bb26e5d578598d3e5c43ed9202f70247174e608ece4966b76a4b8fe

See more details on using hashes here.

Supported by

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