Skip to content

Commit

Permalink
Fix column position when the column has been deleted.
Browse files Browse the repository at this point in the history
  • Loading branch information
GillesTourreau committed Aug 21, 2024
1 parent 37e8c8c commit d585249
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal sealed class SqlServerColumnsComparer : SqlServerObjectComparer
SELECT
[t].[name] AS [TableName],
[c].[name] AS [ColumnName],
[c].[column_id] AS [Position],
ROW_NUMBER() OVER(PARTITION BY [t].[name] ORDER BY [t].[name], [c].[column_id]) AS [Position],
[c].[system_type_id] AS [SystemTypeId],
[ty].[name] AS [TypeName],
[c].[max_length] AS [MaxLength],
Expand Down

0 comments on commit d585249

Please sign in to comment.