addFKto method
IntColumn
addFKto(
- Table table,
- String name, {
- bool allowNull = false,
- bool unique = false,
- IntegrityRule onUpdate = IntegrityRule.cascade,
- IntegrityRule onDelete = IntegrityRule.cascade,
Implementation
IntColumn addFKto(Table table, String name,
{bool allowNull = false,
bool unique = false,
IntegrityRule onUpdate = IntegrityRule.cascade,
IntegrityRule onDelete = IntegrityRule.cascade}) {
IntColumn tmp = db.intColumn(name, allowNull: allowNull, unique: unique);
this.fields.add(tmp);
this.FKs.add(new _ForeignKey(tmp, table, onUpdate: onUpdate, onDelete: onDelete));
tmp._setTable(this);
return tmp;
}