- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ParseConstraint (1.23 sec)
-
migrator/migrator.go
for _, rel := range stmt.Schema.Relationships.Relations { if rel.Field.IgnoreMigration { continue } if constraint := rel.ParseConstraint(); constraint != nil && constraint.Schema == stmt.Schema && !queryTx.Migrator().HasConstraint(value, constraint.Name) { if err := execTx.Migrator().CreateConstraint(value, constraint.Name); err != nil {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Fri Jun 06 02:35:01 UTC 2025 - 29.5K bytes - Viewed (0) -
schema/relationship.go
} vars = append(vars, clause.Table{Name: constraint.Name}, foreignKeys, clause.Table{Name: constraint.ReferenceSchema.Table}, references) return } func (rel *Relationship) ParseConstraint() *Constraint { str := rel.Field.TagSettings["CONSTRAINT"] if str == "-" { return nil } if rel.Type == BelongsTo { for _, r := range rel.FieldSchema.Relationships.Relations {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Aug 18 11:44:52 UTC 2025 - 23.1K bytes - Viewed (1) -
schema/relationship_test.go
) if err != nil { t.Fatalf("Failed to parse schema") } expectedConstraintName := "fk_my_schema_a_very_very_very_very_very_very_very_very_l4db13eec" constraint := s.Relationships.Relations["Author"].ParseConstraint() if constraint.Name != expectedConstraintName { t.Fatalf( "expected constraint name %s, got %s", expectedConstraintName, constraint.Name, ) } }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Aug 18 11:44:52 UTC 2025 - 26.5K bytes - Viewed (0)