allow reorder of pk columns (#1703)

This commit is contained in:
Alan Ren
2022-09-19 14:47:22 -07:00
committed by GitHub
parent 9955ef65ff
commit 5274d3a604
2 changed files with 5 additions and 1 deletions

View File

@@ -836,6 +836,9 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
case TablePropertyNames.Columns:
table.Columns.Move(fromIndex, toIndex);
break;
case TablePropertyNames.PrimaryKeyColumns:
table.PrimaryKey.MoveColumn(fromIndex, toIndex);
break;
default:
break;
}
@@ -1142,6 +1145,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
});
view.PrimaryKeyColumnSpecificationTableOptions.PropertiesToDisplay.Add(IndexColumnSpecificationPropertyNames.Column);
view.PrimaryKeyColumnSpecificationTableOptions.PropertiesToDisplay.Add(IndexColumnSpecificationPropertyNames.Ascending);
view.PrimaryKeyColumnSpecificationTableOptions.CanMoveRows = true;
}
private void SetColumnsViewInfo(TableDesignerView view)