Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing prop name and first column specs #2404

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Microsoft.SqlTools.SqlCore/Localization/sr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.SqlTools.SqlCore/Localization/sr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1324,8 +1324,8 @@
<value>Sequence Number End</value>
<comment></comment>
</data>
<data name="TableDesignerIsSystemVersioningEnabledTitle" xml:space="preserve">
<value>System Versioning Enabled</value>
<data name="TableDesignerIsSystemVersioningTitle" xml:space="preserve">
<value>System Versioning</value>
<comment></comment>
</data>
<data name="TableDesignerIsSystemVersioningEnabledDescription" xml:space="preserve">
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.SqlTools.SqlCore/Localization/sr.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions src/Microsoft.SqlTools.SqlCore/Localization/sr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1505,11 +1505,6 @@
<target state="new">Sequence Number End</target>
<note></note>
</trans-unit>
<trans-unit id="TableDesignerIsSystemVersioningEnabledTitle">
<source>System Versioning Enabled</source>
<target state="new">System Versioning Enabled</target>
<note></note>
</trans-unit>
<trans-unit id="TableDesignerIsSystemVersioningEnabledDescription">
<source>Specifies whether the table is system versioning enabled.</source>
<target state="new">Specifies whether the table is system versioning enabled.</target>
Expand Down Expand Up @@ -1866,6 +1861,11 @@
<target state="new">Shortcuts</target>
<note></note>
</trans-unit>
<trans-unit id="TableDesignerIsSystemVersioningTitle">
<source>System Versioning</source>
<target state="new">System Versioning</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ private void SetTemporalTableViewInfo(TableDesignerView view, Dac.TableDesigner
Group = SR.TableDesignerSystemVersioningGroupTitle,
ComponentProperties = new CheckBoxProperties()
{
Title = SR.TableDesignerIsSystemVersioningEnabledTitle
Title = SR.TableDesignerIsSystemVersioningTitle
}
});

Expand Down Expand Up @@ -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;
}

Expand Down