private void RemoveColumn(PairedNodeCollection <Table, TableColumn> columns, TableColumn columnToRemove)
        {
            RemoveForeignKeys(columnToRemove);
            RemoveIndexes(columnToRemove.Table, columnToRemove.Name);
            var resolvedTableName = mappingResolver.GetNodeName(columnToRemove.Table);

            if (!targetModel.LockedTables.ContainsKey(resolvedTableName))
            {
                targetModel.LockedTables.Add(resolvedTableName, string.Format(Strings.ExTableXCantBeRemovedDueToTheIgnoredColumnY, columnToRemove.Table.Name, columnToRemove.Name));
            }
            columns.Remove(columnToRemove);
        }
 private void RemoveTable(PairedNodeCollection <Schema, Table> tables, Table tableToRemove)
 {
     foreach (var foreignKey in foreignKeysOfSchema)
     {
         if (foreignKey.Owner == tableToRemove || foreignKey.ReferencedTable == tableToRemove)
         {
             if (foreignKey.Owner == tableToRemove)
             {
                 var resolvedTableName = mappingResolver.GetNodeName(foreignKey.ReferencedTable);
                 if (!targetModel.LockedTables.ContainsKey(resolvedTableName))
                 {
                     targetModel.LockedTables.Add(resolvedTableName, string.Format(Strings.ExTableXCantBeRemovedDueToForeignKeyYOfIgnoredTableOrColumn, foreignKey.ReferencedTable.Name, foreignKey.Name));
                 }
             }
             foreignKey.Owner.TableConstraints.Remove(foreignKey);
         }
     }
     tables.Remove(tableToRemove);
 }