This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This product is tested with:

  • python-2.7, 3.4, 3.5
  • django-1.7, 1.8, 1.9, 1.10

Differences from postgres_psycopg2 backend

Type mapping:

  • ‘integer identity(1, 1)’ for AutoField
  • ‘bigint identity(1, 1)’ for BigAutoField
  • ‘timestamp’ for DateTimeField
  • ‘varchar(max)’ for TextField
  • Possibility to multiply VARCHAR length to support utf-8 string, using REDSHIFT_VARCHAR_LENGTH_MULTIPLIER setting.

Stop using:

  • RETURNING.
  • SELECT FOR UPDATE
  • SET TIME ZONE
  • SET CONSTRAINTS
  • 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.

Note and Limitation

Amazon Redshift doesn’t support RETURNING, so last_insert_id method retrieve MAX(pk) after insertion as a workaround.

refs:

In some case, MAX(pk) workaround does not work correctly. Bulk insertion makes non-contiguous IDs like: 1, 4, 7, 10, … and single insertion after such bulk insertion generates strange id value like 2 (smallest non-used id).

SETTINGS

REDSHIFT_VARCHAR_LENGTH_MULTIPLIER:
Possibility to multiply VARCHAR length to support utf-8 string. Default is 1.

TESTING

Testing this package requires:

  • tox-1.8 or later
  • virtualenv-15.0.1 or later
  • pip-8.1.1 or later

and wheelhouse directory contains psycopg2 manylinux1 wheels for using in each tests.

LICENSE

Apache Software License

CHANGES

0.5 (2016-10-05)

  • Support Django-1.10
  • #9: Add support for BigAutoField. Thanks to Maxime Vdb.
  • Fix crush problem on sqlmigrate when field modified.

0.4 (2016-05-17)

  • Support Python-3.4 and 3.5
  • #7: Restore support django-1.7. Version 0.3 doesn’t support django-1.7.
  • #4: More compat with redshift: not use SET CONSTRAINTS. Thanks to Maxime Vdb.
  • #6: More compat with redshift: not use sequence reset query. Thanks to Maxime Vdb.
  • #5: Add REDSHIFT_VARCHAR_LENGTH_MULTIPLIER settings. Thanks to Maxime Vdb.
  • Support column type changing on migration.

0.3 (2016-05-14)

  • #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 (2016-02-01)

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

0.2 (2016-01-08)

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

0.1.2 (2015-06-5)

  • Support Django-1.8

0.1.1 (2015-03-27)

  • Disable “SELECT FOR UPDATE” SQL execution.

0.1 (2015-03-24)

  • Support Django-1.7
  • Support “INSERT INTO” SQL execution without “RETURNING” clause.
Release History

Release History

0.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_redshift_backend-0.5-py2.py3-none-any.whl (10.8 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Oct 5, 2016
django-redshift-backend-0.5.tar.gz (8.0 kB) Copy SHA256 Checksum SHA256 Source Oct 5, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting