Updated_at not being passed to db in image create

This results in fragile tests in which updated_at and
created_at are not equal

Fixes bug 1123515

Change-Id: Ibc29fef092d4d09473abb8818bea53658afcd5bf
Add migration.py based on the one in nova.

This adds a migration.py file for setup and migration commands
similar to the file in nova. This was needed for porting the
new test migration framework.

Change-Id: Ic4d3a5e471b5fb8ee38b22b97df2e99b9fb649a1
Fix issues with migration 012

This commit fixes 3 issues with migration 012:

First for the sqlite downgrade case the schema was being updated
before the data, which made it impossible to be applied. This
reverses the order of those calls correcting the issue.

Second, when the generate_uuid method was moved to one synced
from oslo the import was never updated in migration 012 which
was using generate_uuid(). This commit updates the imports and
uses of generate_uuid() to use the method in oslo.

Thirdly, this patch fixed the downgrade path to work for an image
table with more than one row.

Change-Id: Ib0d3d67e924748863dfdf8eb9e3257ec108ecf68
Merge "Add migration.py based on the one in nova."
Merge "Fix issues with migration 012"
Merge "Updated_at not being passed to db in image create"