Merge pull request #219 from alphagov/module_ordering

Module ordering
Some initial tests around dashboard migration
Handle department and agency creation

Create them if they dont exist. Needs to handle parent_id for agency...
Document add_node method

Document what json is required for the add_node method
Now deals with parent id when creating agency
Add some basic organisation type setting

If it doesnt exist create it - check if we want this behaviour or only
allow agency / department
Organisations now created and updating
Add cascade option to drop schema

Cascade automatically drops objects (tables, functions, etc.) that are
contained in the schema.
Change Business model field length

Changes to a length that will allow us to insert one of the valid
values, which is longer than 20 chars
Log post requests so we know about failed requests
Skip json files without a published attribute

dashboards.json and unimplemented-page-type.json are not dashboards, so
dont have the published flag
Change info field from chararray to textarray

Some of the data we are migrating is longer than 255 characters, so we
need to model this as text instead.

Also migrate the business model field which needs to be longer to fit
all our valid options
More explicit error handling
Module and module type creation

Creates the module type if it doesnt already exist. Still need to
associate data set information with modules.
Fail the script on http errors

Its easier to debug, and during testing we didnt see errors that would
be meaningful to retry
Update module endpoint to not use id

Use data_group and data_type to be consistent with usage elsewhere
Delete useless migration tests

These were useful when developing without endpoints, but not now
Pep-8
Add data group and data type when creating modules
Skip the housing dashboard as it is broken

The housing dashboard references datasets which dont exist so the post
fails when creting modules