diff --git a/src/Microsoft.SqlTools.SqlCore/Localization/sr.cs b/src/Microsoft.SqlTools.SqlCore/Localization/sr.cs index 5fbd1166a0..37353acfa7 100644 --- a/src/Microsoft.SqlTools.SqlCore/Localization/sr.cs +++ b/src/Microsoft.SqlTools.SqlCore/Localization/sr.cs @@ -2415,11 +2415,11 @@ public static string GeneratedAlwaysColumnType_SequenceNumberEnd } } - public static string TableDesignerIsSystemVersioningEnabledTitle + public static string TableDesignerIsSystemVersioningTitle { get { - return Keys.GetString(Keys.TableDesignerIsSystemVersioningEnabledTitle); + return Keys.GetString(Keys.TableDesignerIsSystemVersioningTitle); } } @@ -3814,7 +3814,7 @@ public class Keys public const string GeneratedAlwaysColumnType_SequenceNumberEnd = "GeneratedAlwaysColumnType_SequenceNumberEnd"; - public const string TableDesignerIsSystemVersioningEnabledTitle = "TableDesignerIsSystemVersioningEnabledTitle"; + public const string TableDesignerIsSystemVersioningTitle = "TableDesignerIsSystemVersioningTitle"; public const string TableDesignerIsSystemVersioningEnabledDescription = "TableDesignerIsSystemVersioningEnabledDescription"; diff --git a/src/Microsoft.SqlTools.SqlCore/Localization/sr.resx b/src/Microsoft.SqlTools.SqlCore/Localization/sr.resx index ed1d46f11a..e4ff10d0c4 100644 --- a/src/Microsoft.SqlTools.SqlCore/Localization/sr.resx +++ b/src/Microsoft.SqlTools.SqlCore/Localization/sr.resx @@ -1324,8 +1324,8 @@ Sequence Number End - - System Versioning Enabled + + System Versioning diff --git a/src/Microsoft.SqlTools.SqlCore/Localization/sr.strings b/src/Microsoft.SqlTools.SqlCore/Localization/sr.strings index d5718f6526..f77b16ba2c 100644 --- a/src/Microsoft.SqlTools.SqlCore/Localization/sr.strings +++ b/src/Microsoft.SqlTools.SqlCore/Localization/sr.strings @@ -532,7 +532,7 @@ GeneratedAlwaysColumnType_TransactionIdStart = Transaction Id Start GeneratedAlwaysColumnType_TransactionIdEnd = Transaction Id End GeneratedAlwaysColumnType_SequenceNumberStart = Sequence Number Start GeneratedAlwaysColumnType_SequenceNumberEnd = Sequence Number End -TableDesignerIsSystemVersioningEnabledTitle = System Versioning Enabled +TableDesignerIsSystemVersioningTitle = System Versioning TableDesignerIsSystemVersioningEnabledDescription = Specifies whether the table is system versioning enabled. TableDesignerSystemVersioningGroupTitle = System Versioning TableDesignerHistoryTableDescription = History table of the current table. diff --git a/src/Microsoft.SqlTools.SqlCore/Localization/sr.xlf b/src/Microsoft.SqlTools.SqlCore/Localization/sr.xlf index ff461cb439..4f0f5467d8 100644 --- a/src/Microsoft.SqlTools.SqlCore/Localization/sr.xlf +++ b/src/Microsoft.SqlTools.SqlCore/Localization/sr.xlf @@ -1505,11 +1505,6 @@ Sequence Number End - - System Versioning Enabled - System Versioning Enabled - - Specifies whether the table is system versioning enabled. Specifies whether the table is system versioning enabled. @@ -1866,6 +1861,11 @@ Shortcuts + + System Versioning + System Versioning + + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.SqlCore/TableDesigner/TableDesignerManager.cs b/src/Microsoft.SqlTools.SqlCore/TableDesigner/TableDesignerManager.cs index 21505530d8..e0caf0c9b1 100644 --- a/src/Microsoft.SqlTools.SqlCore/TableDesigner/TableDesignerManager.cs +++ b/src/Microsoft.SqlTools.SqlCore/TableDesigner/TableDesignerManager.cs @@ -1577,7 +1577,7 @@ private void SetTemporalTableViewInfo(TableDesignerView view, Dac.TableDesigner Group = SR.TableDesignerSystemVersioningGroupTitle, ComponentProperties = new CheckBoxProperties() { - Title = SR.TableDesignerIsSystemVersioningEnabledTitle + Title = SR.TableDesignerIsSystemVersioningTitle } }); @@ -1718,6 +1718,16 @@ private Dac.TableDesigner CreateTableDesigner(TableInfo tableInfo) tableDesigner = new Dac.TableDesigner(tableInfo.ProjectFilePath, tableInfo.TableScriptPath, tableInfo.AllScripts, tableInfo.TargetVersion); } this.idTableMap[tableInfo.Id] = tableDesigner; + if (tableInfo.IsNewTable) + { + var firstColumn = tableDesigner.TableViewModel.Columns.Items[0]; + if (firstColumn != null) + { + firstColumn.Name = "Id"; + firstColumn.IsIdentity = true; + firstColumn.IsPrimaryKey = true; + } + } return tableDesigner; }