mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
dialect/sql/schema: no longer allocate a PK range for a join table (#2950)
* dialect/sql/schema: no longer allocate a PK range for a join table * test that no breaking change is introduced
This commit is contained in:
@@ -803,7 +803,7 @@ func (a *Atlas) tables(tables []*Table) ([]*schema.Table, error) {
|
||||
for i, et := range tables {
|
||||
at := schema.NewTable(et.Name)
|
||||
a.sqlDialect.atTable(et, at)
|
||||
if a.universalID && et.Name != TypeTable {
|
||||
if a.universalID && et.Name != TypeTable && len(et.PrimaryKey) == 1 {
|
||||
r, err := a.pkRange(et)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user