ForeignKey constructor
ForeignKey({})
Creates a foreign key constraint.
name is the field name in the current table (required)
refTable is the referenced table name (required)
refColumn is the referenced column name (default: 'id')
onDelete specifies the action on delete (default: 'NO ACTION')
Common values: 'CASCADE', 'SET NULL', 'RESTRICT', 'NO ACTION'
onUpdate specifies the action on update (default: 'NO ACTION')
Common values: 'CASCADE', 'SET NULL', 'RESTRICT', 'NO ACTION'
Implementation
ForeignKey({
required this.name,
required this.refTable,
this.refColumn = 'id',
this.onDelete = 'NO ACTION',
this.onUpdate = 'NO ACTION',
});