Skip to content

SQL Server does not remove the unique index on ChangeColumn() with no ColumnProperty.Unique #132

Description

@JaBistDuNarrisch

On SQL Server and may be on others as well a unique index is created if using ColumnProperty.Unique.

If the ColumnProperty.Unique is removed by changing the column using ChangeColumn(), the unique index is not removed.

This one is tricky since it could remove an index that was intended and that matches the naming pattern used in ChangeColumn().

[Test, Ignore("This issue is not yet fixed. See https://github.com/dotnetprojects/Migrator.NET/issues/132")]

=> Remove Ignore in test after fix

AddUniqueConstraint(string.Format("UX_{0}_{1}", table, column.Name), table, [column.Name]);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions