mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #373 -- Added CompositePrimaryKey.
Thanks Lily Foote and Simon Charette for reviews and mentoring this Google Summer of Code 2024 project. Co-authored-by: Simon Charette <charette.s@gmail.com> Co-authored-by: Lily Foote <code@lilyf.org>
This commit is contained in:
committed by
Sarah Boyce
parent
86661f2449
commit
978aae4334
75
tests/composite_pk/fixtures/tenant.json
Normal file
75
tests/composite_pk/fixtures/tenant.json
Normal file
@@ -0,0 +1,75 @@
|
||||
[
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "composite_pk.tenant",
|
||||
"fields": {
|
||||
"id": 1,
|
||||
"name": "Tenant 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "composite_pk.tenant",
|
||||
"fields": {
|
||||
"id": 2,
|
||||
"name": "Tenant 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "composite_pk.tenant",
|
||||
"fields": {
|
||||
"id": 3,
|
||||
"name": "Tenant 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": [1, 1],
|
||||
"model": "composite_pk.user",
|
||||
"fields": {
|
||||
"tenant_id": 1,
|
||||
"id": 1,
|
||||
"email": "user0001@example.com"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": [1, 2],
|
||||
"model": "composite_pk.user",
|
||||
"fields": {
|
||||
"tenant_id": 1,
|
||||
"id": 2,
|
||||
"email": "user0002@example.com"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": [2, 3],
|
||||
"model": "composite_pk.user",
|
||||
"fields": {
|
||||
"email": "user0003@example.com"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "composite_pk.user",
|
||||
"fields": {
|
||||
"tenant_id": 2,
|
||||
"id": 4,
|
||||
"email": "user0004@example.com"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": [2, "11111111-1111-1111-1111-111111111111"],
|
||||
"model": "composite_pk.post",
|
||||
"fields": {
|
||||
"tenant_id": 2,
|
||||
"id": "11111111-1111-1111-1111-111111111111"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": [2, "ffffffff-ffff-ffff-ffff-ffffffffffff"],
|
||||
"model": "composite_pk.post",
|
||||
"fields": {
|
||||
"tenant_id": 2,
|
||||
"id": "ffffffff-ffff-ffff-ffff-ffffffffffff"
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user