Minor adjustment
This commit is contained in:
parent
06a30f7820
commit
af3477dffd
2 changed files with 33 additions and 34 deletions
|
|
@ -1493,11 +1493,11 @@ dst.id <-> src.dst_id
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
srcIndex := g.Edges[0].SrcTableColumnIndex
|
srcIndex := g.Edges[0].SrcTableColumnIndex
|
||||||
if srcIndex == nil || *srcIndex != 0 {
|
if srcIndex == nil || *srcIndex != 0 {
|
||||||
t.Fatalf("Expected SrcTableColumnIndex to be 0, got %v", srcIndex)
|
t.Fatalf("expected SrcTableColumnIndex to be 0, got %v", srcIndex)
|
||||||
}
|
}
|
||||||
dstIndex := g.Edges[0].DstTableColumnIndex
|
dstIndex := g.Edges[0].DstTableColumnIndex
|
||||||
if dstIndex == nil || *dstIndex != 1 {
|
if dstIndex == nil || *dstIndex != 1 {
|
||||||
t.Fatalf("Expected DstTableColumnIndex to be 1, got %v", dstIndex)
|
t.Fatalf("expected DstTableColumnIndex to be 1, got %v", dstIndex)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -833,42 +833,41 @@ a -> md -> b
|
||||||
`,
|
`,
|
||||||
}, {
|
}, {
|
||||||
name: "sql_tables",
|
name: "sql_tables",
|
||||||
script: `
|
script: `users: {
|
||||||
users: {
|
shape: sql_table
|
||||||
shape: sql_table
|
id: int
|
||||||
id: int
|
name: string
|
||||||
name: string
|
email: string
|
||||||
email: string
|
password: string
|
||||||
password: string
|
last_login: datetime
|
||||||
last_login: datetime
|
}
|
||||||
}
|
|
||||||
|
|
||||||
products: {
|
products: {
|
||||||
shape: sql_table
|
shape: sql_table
|
||||||
id: int
|
id: int
|
||||||
price: decimal
|
price: decimal
|
||||||
sku: string
|
sku: string
|
||||||
name: string
|
name: string
|
||||||
}
|
}
|
||||||
|
|
||||||
orders: {
|
orders: {
|
||||||
shape: sql_table
|
shape: sql_table
|
||||||
id: int
|
id: int
|
||||||
user_id: int
|
user_id: int
|
||||||
product_id: int
|
product_id: int
|
||||||
}
|
}
|
||||||
|
|
||||||
shipments: {
|
shipments: {
|
||||||
shape: sql_table
|
shape: sql_table
|
||||||
id: int
|
id: int
|
||||||
order_id: int
|
order_id: int
|
||||||
tracking_number: string
|
tracking_number: string
|
||||||
status: string
|
status: string
|
||||||
}
|
}
|
||||||
|
|
||||||
users.id <-> orders.user_id
|
users.id <-> orders.user_id
|
||||||
products.id <-> orders.product_id
|
products.id <-> orders.product_id
|
||||||
shipments.order_id <-> orders.id`,
|
shipments.order_id <-> orders.id`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue