private void DropConstraints(StringBuilder script, ISourceProvider provider)
        {
            var uks = Model.GetActiveEntities().SelectMany(e => e.GetActiveProperties())
                      .Where(item => item.SourceFragment != null &&
                             item.SourceFragment.Constraints.Any(cns =>
                                                                 cns.ConstraintType != SourceConstraint.ForeignKeyConstraintTypeName));

            if (uks.Count() == 0)
            {
                return;
            }
            bool hdr = false;

            foreach (SourceFragmentDefinition s in SourceView.GetSourceFragments())
            {
                var targetSF = s;

                SourceFragmentDefinition sf = uks.Select(item => item.SourceFragment).Distinct()
                                              .SingleOrDefault(item => item.Name == s.Name && item.Selector == s.Selector);

                if (sf != null)
                {
                    foreach (SourceConstraint constraint in targetSF.Constraints.Where(item =>
                                                                                       item.ConstraintType != SourceConstraint.ForeignKeyConstraintTypeName))
                    {
                        if (!sf.Constraints.Any(item => item.SourceFields.Count == constraint.SourceFields.Count &&
                                                item.ConstraintType == constraint.ConstraintType &&
                                                constraint.SourceFields.All(fld =>
                                                                            item.SourceFields.Any(sfld =>
                                                                                                  sfld.SourceFieldExpression == fld.SourceFieldExpression))))
                        {
                            if (!hdr)
                            {
                                script.AppendLine("--Drop constraints");
                                hdr = true;
                            }

                            provider.GenerateDropConstraintScript(targetSF, constraint.ConstraintName, script);
                        }
                    }
                }
            }
        }