mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Remove preview from 2022 in sql projects (#20940)
* remove preview from 2022 in sql projects * update new project baselines * update system dacpac tests * fix other 150 system dacpac test checks
This commit is contained in:
@@ -161,7 +161,7 @@ export function OptionNotFoundWarningMessage(label: string) { return localize('o
|
|||||||
export const SqlServerName = 'SQL server';
|
export const SqlServerName = 'SQL server';
|
||||||
export const AzureSqlServerName = 'Azure SQL server';
|
export const AzureSqlServerName = 'Azure SQL server';
|
||||||
export const SqlServerDockerImageName = 'Microsoft SQL Server';
|
export const SqlServerDockerImageName = 'Microsoft SQL Server';
|
||||||
export const SqlServerDocker2022ImageName = 'Microsoft SQL Server 2022 (preview)';
|
export const SqlServerDocker2022ImageName = 'Microsoft SQL Server 2022';
|
||||||
export const AzureSqlDbFullDockerImageName = 'Azure SQL Database emulator Full';
|
export const AzureSqlDbFullDockerImageName = 'Azure SQL Database emulator Full';
|
||||||
export const AzureSqlDbLiteDockerImageName = 'Azure SQL Database emulator Lite';
|
export const AzureSqlDbLiteDockerImageName = 'Azure SQL Database emulator Lite';
|
||||||
export const AzureSqlLogicalServerName = 'Azure SQL logical server';
|
export const AzureSqlLogicalServerName = 'Azure SQL logical server';
|
||||||
@@ -603,7 +603,7 @@ export const onPremServerVersionToTargetPlatform: Map<number, SqlTargetPlatform>
|
|||||||
// DW is special since the system dacpac folder has a different name from the target platform
|
// DW is special since the system dacpac folder has a different name from the target platform
|
||||||
export const AzureDwFolder = 'AzureDw';
|
export const AzureDwFolder = 'AzureDw';
|
||||||
|
|
||||||
export const defaultTargetPlatform = SqlTargetPlatform.sqlServer2019; // TODO: update to 2022 when it's GA
|
export const defaultTargetPlatform = SqlTargetPlatform.sqlServer2022;
|
||||||
export const defaultDSP = targetPlatformToVersion.get(defaultTargetPlatform)!;
|
export const defaultDSP = targetPlatformToVersion.get(defaultTargetPlatform)!;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Name>TestProjectName</Name>
|
<Name>TestProjectName</Name>
|
||||||
<ProjectGuid>{2C283C5D-9E4A-4313-8FF9-4E0CEE20B063}</ProjectGuid>
|
<ProjectGuid>{2C283C5D-9E4A-4313-8FF9-4E0CEE20B063}</ProjectGuid>
|
||||||
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql150DatabaseSchemaProvider</DSP>
|
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
|
||||||
<ModelCollation>1033, CI</ModelCollation>
|
<ModelCollation>1033, CI</ModelCollation>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Name>TestProjectName</Name>
|
<Name>TestProjectName</Name>
|
||||||
<ProjectGuid>{2C283C5D-9E4A-4313-8FF9-4E0CEE20B063}</ProjectGuid>
|
<ProjectGuid>{2C283C5D-9E4A-4313-8FF9-4E0CEE20B063}</ProjectGuid>
|
||||||
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql150DatabaseSchemaProvider</DSP>
|
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
|
||||||
<ModelCollation>1033, CI</ModelCollation>
|
<ModelCollation>1033, CI</ModelCollation>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Name>TestProjectName</Name>
|
<Name>TestProjectName</Name>
|
||||||
<ProjectGuid>{2C283C5D-9E4A-4313-8FF9-4E0CEE20B063}</ProjectGuid>
|
<ProjectGuid>{2C283C5D-9E4A-4313-8FF9-4E0CEE20B063}</ProjectGuid>
|
||||||
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql150DatabaseSchemaProvider</DSP>
|
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
|
||||||
<ModelCollation>1033, CI</ModelCollation>
|
<ModelCollation>1033, CI</ModelCollation>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectVersion>4.1</ProjectVersion>
|
<ProjectVersion>4.1</ProjectVersion>
|
||||||
<ProjectGuid>{BA5EBA11-C0DE-5EA7-ACED-BABB1E70A575}</ProjectGuid>
|
<ProjectGuid>{BA5EBA11-C0DE-5EA7-ACED-BABB1E70A575}</ProjectGuid>
|
||||||
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql150DatabaseSchemaProvider</DSP>
|
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
|
||||||
<OutputType>Database</OutputType>
|
<OutputType>Database</OutputType>
|
||||||
<RootPath>
|
<RootPath>
|
||||||
</RootPath>
|
</RootPath>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectVersion>4.1</ProjectVersion>
|
<ProjectVersion>4.1</ProjectVersion>
|
||||||
<ProjectGuid>{BA5EBA11-C0DE-5EA7-ACED-BABB1E70A575}</ProjectGuid>
|
<ProjectGuid>{BA5EBA11-C0DE-5EA7-ACED-BABB1E70A575}</ProjectGuid>
|
||||||
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql150DatabaseSchemaProvider</DSP>
|
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
|
||||||
<OutputType>Database</OutputType>
|
<OutputType>Database</OutputType>
|
||||||
<RootPath>
|
<RootPath>
|
||||||
</RootPath>
|
</RootPath>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectVersion>4.1</ProjectVersion>
|
<ProjectVersion>4.1</ProjectVersion>
|
||||||
<ProjectGuid>{BA5EBA11-C0DE-5EA7-ACED-BABB1E70A575}</ProjectGuid>
|
<ProjectGuid>{BA5EBA11-C0DE-5EA7-ACED-BABB1E70A575}</ProjectGuid>
|
||||||
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql150DatabaseSchemaProvider</DSP>
|
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
|
||||||
<OutputType>Database</OutputType>
|
<OutputType>Database</OutputType>
|
||||||
<RootPath>
|
<RootPath>
|
||||||
</RootPath>
|
</RootPath>
|
||||||
|
|||||||
@@ -158,8 +158,8 @@ describe('Project: sqlproj content operations', function (): void {
|
|||||||
|
|
||||||
let uri = project.getSystemDacpacUri(constants.masterDacpac);
|
let uri = project.getSystemDacpacUri(constants.masterDacpac);
|
||||||
let ssdtUri = project.getSystemDacpacSsdtUri(constants.masterDacpac);
|
let ssdtUri = project.getSystemDacpacSsdtUri(constants.masterDacpac);
|
||||||
should.equal(uri.fsPath, Uri.parse(path.join('$(NETCoreTargetsPath)', 'SystemDacpacs', '150', constants.masterDacpac)).fsPath);
|
should.equal(uri.fsPath, Uri.parse(path.join('$(NETCoreTargetsPath)', 'SystemDacpacs', '160', constants.masterDacpac)).fsPath);
|
||||||
should.equal(ssdtUri.fsPath, Uri.parse(path.join('$(DacPacRootPath)', 'Extensions', 'Microsoft', 'SQLDB', 'Extensions', 'SqlServer', '150', 'SqlSchemas', constants.masterDacpac)).fsPath);
|
should.equal(ssdtUri.fsPath, Uri.parse(path.join('$(DacPacRootPath)', 'Extensions', 'Microsoft', 'SQLDB', 'Extensions', 'SqlServer', '160', 'SqlSchemas', constants.masterDacpac)).fsPath);
|
||||||
|
|
||||||
await project.changeTargetPlatform(constants.targetPlatformToVersion.get(SqlTargetPlatform.sqlServer2016)!);
|
await project.changeTargetPlatform(constants.targetPlatformToVersion.get(SqlTargetPlatform.sqlServer2016)!);
|
||||||
uri = project.getSystemDacpacUri(constants.masterDacpac);
|
uri = project.getSystemDacpacUri(constants.masterDacpac);
|
||||||
@@ -192,8 +192,8 @@ describe('Project: sqlproj content operations', function (): void {
|
|||||||
let projFileText = await fs.readFile(projFilePath);
|
let projFileText = await fs.readFile(projFilePath);
|
||||||
|
|
||||||
should.equal(project.databaseReferences.length, 1, 'System db reference should have been added');
|
should.equal(project.databaseReferences.length, 1, 'System db reference should have been added');
|
||||||
should(projFileText.includes(convertSlashesForSqlProj(Uri.file(path.join('$(NETCoreTargetsPath)', 'SystemDacpacs', '150', constants.masterDacpac)).fsPath.substring(1)))).be.true('System db reference path should be 150');
|
should(projFileText.includes(convertSlashesForSqlProj(Uri.file(path.join('$(NETCoreTargetsPath)', 'SystemDacpacs', '160', constants.masterDacpac)).fsPath.substring(1)))).be.true('System db reference path should be 160');
|
||||||
should(projFileText.includes(convertSlashesForSqlProj(Uri.file(path.join('$(DacPacRootPath)', 'Extensions', 'Microsoft', 'SQLDB', 'Extensions', 'SqlServer', '150', 'SqlSchemas', constants.masterDacpac)).fsPath.substring(1)))).be.true('System db SSDT reference path should be 150');
|
should(projFileText.includes(convertSlashesForSqlProj(Uri.file(path.join('$(DacPacRootPath)', 'Extensions', 'Microsoft', 'SQLDB', 'Extensions', 'SqlServer', '160', 'SqlSchemas', constants.masterDacpac)).fsPath.substring(1)))).be.true('System db SSDT reference path should be 160');
|
||||||
|
|
||||||
await project.changeTargetPlatform(constants.targetPlatformToVersion.get(SqlTargetPlatform.sqlServer2016)!);
|
await project.changeTargetPlatform(constants.targetPlatformToVersion.get(SqlTargetPlatform.sqlServer2016)!);
|
||||||
projFileText = await fs.readFile(projFilePath);
|
projFileText = await fs.readFile(projFilePath);
|
||||||
@@ -217,8 +217,8 @@ describe('Project: sqlproj content operations', function (): void {
|
|||||||
|
|
||||||
let uri = project.getSystemDacpacUri(constants.msdbDacpac);
|
let uri = project.getSystemDacpacUri(constants.msdbDacpac);
|
||||||
let ssdtUri = project.getSystemDacpacSsdtUri(constants.msdbDacpac);
|
let ssdtUri = project.getSystemDacpacSsdtUri(constants.msdbDacpac);
|
||||||
should.equal(uri.fsPath, Uri.parse(path.join('$(NETCoreTargetsPath)', 'SystemDacpacs', '150', constants.msdbDacpac)).fsPath);
|
should.equal(uri.fsPath, Uri.parse(path.join('$(NETCoreTargetsPath)', 'SystemDacpacs', '160', constants.msdbDacpac)).fsPath);
|
||||||
should.equal(ssdtUri.fsPath, Uri.parse(path.join('$(DacPacRootPath)', 'Extensions', 'Microsoft', 'SQLDB', 'Extensions', 'SqlServer', '150', 'SqlSchemas', constants.msdbDacpac)).fsPath);
|
should.equal(ssdtUri.fsPath, Uri.parse(path.join('$(DacPacRootPath)', 'Extensions', 'Microsoft', 'SQLDB', 'Extensions', 'SqlServer', '160', 'SqlSchemas', constants.msdbDacpac)).fsPath);
|
||||||
|
|
||||||
await project.changeTargetPlatform(constants.targetPlatformToVersion.get(SqlTargetPlatform.sqlServer2016)!);
|
await project.changeTargetPlatform(constants.targetPlatformToVersion.get(SqlTargetPlatform.sqlServer2016)!);
|
||||||
uri = project.getSystemDacpacUri(constants.msdbDacpac);
|
uri = project.getSystemDacpacUri(constants.msdbDacpac);
|
||||||
|
|||||||
Reference in New Issue
Block a user