/// <summary> /// Gets an operation to drop the associated index on the foreign key column(s). /// </summary> /// <returns> An operation to drop the index. </returns> public virtual DropIndexOperation CreateDropIndexOperation() { var dropIndexOperation = new DropIndexOperation(_inverse.CreateCreateIndexOperation()) { Table = DependentTable }; DependentColumns.Each(c => dropIndexOperation.Columns.Add(c)); return(dropIndexOperation); }
/// <summary> /// Gets an operation to create an index on the foreign key column(s). /// </summary> /// <returns> An operation to add the index. </returns> public virtual CreateIndexOperation CreateCreateIndexOperation() { var createIndexOperation = new CreateIndexOperation { Table = DependentTable }; DependentColumns.Each(c => createIndexOperation.Columns.Add(c)); return(createIndexOperation); }