Models should be the same as the state in DB after migration
For creation we are using migrations.
We don't have any tests that check that our models are up-to-date.
So we should:
1) Add in __table_args__ indexes and unique constraints
2) Fix all mistakes in models
3) Fix all mistakes in migrations
4) Sync effects of migrations in different backends.
5) Add tests that ensure that models are up-to-date.
This will allow us to find some mistakes or missing indexes and make the work with db cleaner.
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Low
- Drafter:
- Elena Ezhova
- Direction:
- Needs approval
- Assignee:
- Elena Ezhova
- Definition:
- Review
- Series goal:
- Accepted for havana
- Implementation:
- Implemented
- Milestone target:
- 2013.2
- Started by
- Elena Ezhova
- Completed by
- Dolph Mathews
Related branches
Related bugs
Sprints
Whiteboard
List of models:
✓Domain
✓GroupDomainGrant
✓GroupProjectGrant
✓Project
✓Role
✓UserDomainGrant
✓UserProjectGrant
✓Endpoint
✓Service
✓Ec2Credential
✓CredentialModel
✓Group
✓User
✓UserGroupMembe
✓PolicyModel
✓TokenModel
✓TrustModel
✓TrustRole
Gerrit topic: https:/
Addressed by: https:/
Sync models with migrations
Addressed by: https:/
Sync DB models and migrations in keystone.
Addressed by: https:/
Drop extra credential indexes
tracking this here as 'low priority', but obviously if it represents bug fixes, they need to be handled accordingly -dolph
Gerrit topic: https:/
Addressed by: https:/
Comparision of database models and migrations.