niwibe/djorm-ext-pgarray — pull request #37 by carljm (2014-05-30 19:20:08+00:00)
Title: Simplify, improve, and test ArrayField.deconstruct

This removes the unnecessary version-checking around the `deconstruct` method and the unnecessary implementation of the `db_parameters` method -- see #26 -- as well as improving the implementation of `deconstruct`:

1. The previous implementation did not handle `blank`, `null`, or `default`, even though `ArrayField` sets different defaults for these parameters. This meant that if someone created an `ArrayField(null=False)`, the super implementation of `deconstruct` would omit that parameter entirely from the returned `kwargs`, thinking it was set to the default, causing the rehydrated `ArrayField` instance to have `null=True`.

2. Per the Django docs, it is preferred for `deconstruct()` to omit keyword arguments that are set to their default values. This PR implements that behavior for `dbtype` and `dimension` parameters.