You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When schema information is fetched from SQL server, the getListTableIndexesSQL was fetching index columns ordered by sys.index_columns.index_column_id. This was incorrect, because that column is simply a unique id for the column within the index. The column ordering information is actually in the key_ordinal column.
This PR changes SQLServerPlatform to generate a resultset ordered by key_ordinal instead of index_column_id.
This was causing schema diffs on tables with composite primary keys to try to drop and re-create the indexes every time the diff is run.
So this solves index churn in schema diffs on SQL server.
The text was updated successfully, but these errors were encountered:
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of zeroedin-bill:
Url: #826
Message:
When schema information is fetched from SQL server, the getListTableIndexesSQL was fetching index columns ordered by sys.index_columns.index_column_id. This was incorrect, because that column is simply a unique id for the column within the index. The column ordering information is actually in the key_ordinal column.
This PR changes SQLServerPlatform to generate a resultset ordered by key_ordinal instead of index_column_id.
This was causing schema diffs on tables with composite primary keys to try to drop and re-create the indexes every time the diff is run.
So this solves index churn in schema diffs on SQL server.
The text was updated successfully, but these errors were encountered: