mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: change name format for edge fks (#286)
* entc/gen: change name format for edge fks * dialect/sql/schema: add fixture support for mysql and postgres * sql/dialect: merge fkcolumn queries to one for the 2 dialects
This commit is contained in:
@@ -19,11 +19,11 @@ const (
|
||||
// ParentTable is the table the holds the parent relation/edge.
|
||||
ParentTable = "nodes"
|
||||
// ParentColumn is the table column denoting the parent relation/edge.
|
||||
ParentColumn = "parent_id"
|
||||
ParentColumn = "node_children"
|
||||
// ChildrenTable is the table the holds the children relation/edge.
|
||||
ChildrenTable = "nodes"
|
||||
// ChildrenColumn is the table column denoting the children relation/edge.
|
||||
ChildrenColumn = "parent_id"
|
||||
ChildrenColumn = "node_children"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for node fields.
|
||||
@@ -34,5 +34,5 @@ var Columns = []string{
|
||||
|
||||
// ForeignKeys holds the SQL foreign-keys that are owned by the Node type.
|
||||
var ForeignKeys = []string{
|
||||
"parent_id",
|
||||
"node_children",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user