Foreign keys should relate to fields of the same type
Bug #861682 reported by
Juan L. Negron
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
High
|
Unassigned | ||
keystone (Ubuntu) |
Fix Released
|
High
|
Brian Thomason | ||
Oneiric |
Fix Released
|
High
|
Brian Thomason |
Bug Description
When using MySQL with InnoDB, the foreign key relations should have the same type.
The role table has a foreign key relation between it's service_id and the services.id field. Currently these two fields are of different types ( role.service_id is an integer while service.id is a varchar(255) which creates an error in MySQL/InnoDB.
I patched role.service_id to be a varchar(255) as well and that seems to fix the issue at hand at least for now.
Related branches
lp://staging/~negronjl/keystone/861682
Ready for review
for merging
into
lp://staging/keystone/trunk
- Ziad Sawalha: Pending requested
-
Diff: 11 lines (+1/-1)1 file modifiedkeystone/backends/sqlalchemy/models.py (+1/-1)
Changed in keystone (Ubuntu): | |
assignee: | nobody → Brian Thomason (brian-thomason) |
importance: | Undecided → High |
status: | New → In Progress |
Changed in keystone: | |
status: | New → Fix Committed |
Changed in keystone (Ubuntu Oneiric): | |
status: | Invalid → In Progress |
Changed in keystone: | |
importance: | Undecided → High |
Changed in keystone: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Attaching patch