public virtual IEnumerable<string> Run(CreateForeignKeyCommand command) { var builder = new StringBuilder(); builder.Append("alter table ") .Append(_dialect.QuoteForTableName(command.SrcTable)); builder.Append(_dialect.GetAddForeignKeyConstraintString(command.Name, command.SrcColumns, _dialect.QuoteForTableName(command.DestTable), command.DestColumns, false)); yield return builder.ToString(); }
public override IEnumerable<string> Run(CreateForeignKeyCommand command) { yield break; }
public SchemaBuilder CreateForeignKey(string name, string srcModule, string srcTable, string[] srcColumns, string destModule, string destTable, string[] destColumns) { var command = new CreateForeignKeyCommand(FormatTable(name), FormatTable(srcTable), srcColumns, FormatTable(destTable), destColumns); Execute(_builder.CreateSql(command)); return this; }