Common test for checking models with migrations

Registered by Svetlana Shturm

All component from Openstack uses models as python representation and migrations as database creation tools.
There is no check for equality of models with databse state.
In fact we have differences in models. We are working on syncing models with migrations, but it will be better to have common test that will check any differences. It can be used in any components of OpenStack.
For checking mysql and postgress should be used.
Objects for testing:
- columns (type, length, default values, nullable),
- constraints (foreign key, unique key, indexes).

Blueprint information

Status:
Started
Approver:
Doug Hellmann
Priority:
High
Drafter:
Svetlana Shturm
Direction:
Needs approval
Assignee:
Svetlana Shturm
Definition:
Approved
Series goal:
None
Implementation:
Started
Milestone target:
None
Started by
Doug Hellmann

Related branches

Sprints

Whiteboard

See https://review.openstack.org/45428

Gerrit topic: https://review.openstack.org/#q,topic:bp/sync-models-with-migrations,n,z

Addressed by: https://review.openstack.org/48047
    Add class for checking models with db

Addressed by: https://review.openstack.org/42307
    Add test for checking models with migrations

Addressed by: https://review.openstack.org/48231
    Test cover for testing of models with database

Addressed by: https://review.openstack.org/59908
    Add class for checking models with db(part II)

Quite a few of these reviews are abandoned. Is this blueprint still on target for icehouse-2? -- dhellmann

Addressed by: https://review.openstack.org/74081
    Add a base test case for DB schema comparison

Addressed by: https://review.openstack.org/74963
    Prevent races in opportunistic db test cases

Addressed by: https://review.openstack.org/75026
    Make db utils importable without migrate

Addressed by: https://review.openstack.org/75419
    Adapt DB provisioning code for CI requirements

Addressed by: https://review.openstack.org/93283
    Add a base test case for DB schema comparison

Addressed by: https://review.openstack.org/93324
    Sync test_migrations.py with incubator

Addressed by: https://review.openstack.org/93398
    Add a base test case for DB schema comparison

Addressed by: https://review.openstack.org/115401
    Prevent races in opportunistic db test cases

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.