@@ -443,7 +443,7 @@ type ColumnDefaultSemantics interface {
443
443
func (ColumnDefaultExpr ) isColumnDefaultSemantics () {}
444
444
func (GeneratedColumnExpr ) isColumnDefaultSemantics () {}
445
445
func (IdentityColumn ) isColumnDefaultSemantics () {}
446
- func (AutoIncrement ) isColumnDefaultSemantics () {}
446
+ func (AutoIncrement ) isColumnDefaultSemantics () {}
447
447
448
448
type SequenceParam interface {
449
449
Node
@@ -2569,19 +2569,22 @@ type TableConstraint struct {
2569
2569
2570
2570
// ForeignKey is foreign key specifier in CREATE TABLE and ALTER TABLE.
2571
2571
//
2572
- // FOREIGN KEY ({{.ColumnNames | sqlJoin ","}}) REFERENCES {{.ReferenceTable}} ({{.ReferenceColumns | sqlJoin ","}}) {{.OnDelete}}
2572
+ // FOREIGN KEY ({{.ColumnNames | sqlJoin ","}}) REFERENCES {{.ReferenceTable}} ({{.ReferenceColumns | sqlJoin ","}})
2573
+ // {{.OnDelete}} {{.Enforcement}}
2573
2574
type ForeignKey struct {
2574
2575
// pos = Foreign
2575
- // end = OnDeleteEnd || Rparen + 1
2576
+ // end = Enforced + 8 || OnDeleteEnd || Rparen + 1
2576
2577
2577
2578
Foreign token.Pos // position of "FOREIGN" keyword
2578
2579
Rparen token.Pos // position of ")" after reference columns
2579
2580
OnDeleteEnd token.Pos // end position of ON DELETE clause
2581
+ Enforced token.Pos // position of "ENFORCED", optional
2580
2582
2581
2583
Columns []* Ident
2582
2584
ReferenceTable * Path
2583
2585
ReferenceColumns []* Ident // len(ReferenceColumns) > 0
2584
2586
OnDelete OnDeleteAction // optional
2587
+ Enforcement Enforcement // optional
2585
2588
}
2586
2589
2587
2590
// Check is check constraint in CREATE TABLE and ALTER TABLE.
0 commit comments