mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: resolve merge conflicts on global id file (#4312)
This commit is contained in:
@@ -135,7 +135,7 @@ type Annotation struct {
|
||||
//
|
||||
// By default, this value is nil defaulting to whatever the database settings are.
|
||||
//
|
||||
IncrementStart *int64 `json:"increment_start,omitempty"`
|
||||
IncrementStart *int `json:"increment_start,omitempty"`
|
||||
|
||||
// OnDelete specifies a custom referential action for DELETE operations on parent
|
||||
// table that has matching rows in the child table.
|
||||
@@ -384,7 +384,7 @@ func OnDelete(opt ReferenceOption) *Annotation {
|
||||
// entsql.IncrementStart(100),
|
||||
// }
|
||||
// }
|
||||
func IncrementStart(i int64) *Annotation {
|
||||
func IncrementStart(i int) *Annotation {
|
||||
return &Annotation{
|
||||
IncrementStart: &i,
|
||||
}
|
||||
|
||||
@@ -860,7 +860,7 @@ func (a *Atlas) tables(tables []*Table) ([]*schema.Table, error) {
|
||||
}
|
||||
a.sqlDialect.atIncrementT(at, r)
|
||||
case et.Annotation != nil && et.Annotation.IncrementStart != nil:
|
||||
a.sqlDialect.atIncrementT(at, *et.Annotation.IncrementStart)
|
||||
a.sqlDialect.atIncrementT(at, int64(*et.Annotation.IncrementStart))
|
||||
}
|
||||
if err := a.aColumns(et, at); err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -376,7 +376,7 @@ func TestAtlas_StateReader(t *testing.T) {
|
||||
{Name: "active", Type: field.TypeBool},
|
||||
},
|
||||
Annotation: &entsql.Annotation{
|
||||
IncrementStart: func(i int64) *int64 { return &i }(100),
|
||||
IncrementStart: func(i int) *int { return &i }(100),
|
||||
},
|
||||
}).ReadState(context.Background())
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user