Skip to content

Commit 4822f6b

Browse files
[SQL] Add breaking change warning (Azure#14673)
* add breaking change warning * Update breaking change warning to target cmdlet output * Update changelog to show breaking change warnings added * "upcoming release" Co-authored-by: Dingmeng Xue <[email protected]>
1 parent 5c65060 commit 4822f6b

10 files changed

+71
-0
lines changed

src/Sql/Sql/ChangeLog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added cmdlet output breaking change warnings to the following:
22+
- `New-AzSqlDatabase`
23+
- `Get-AzSqlDatabase`
24+
- `Set-AzSqlDatabase`
25+
- `Remove-AzSqlDatabase`
26+
- `New-AzSqlDatabaseSecondary`
27+
- `Remove-AzSqlDatabaseSecondary`
28+
- `Get-AzSqlDatabaseReplicationLink`
29+
- `New-AzSqlDatabaseCopy`
30+
- `Set-AzSqlDatabaseSecondary`
31+
2132

2233
## Version 2.17.0
2334
* Added cmdlet `New-AzSqlServerTrustGroup`

src/Sql/Sql/Database/Cmdlet/GetAzureSqlDatabase.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,18 @@
1414

1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using Microsoft.Azure.Commands.Sql.Database.Model;
17+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
18+
using System;
1719
using System.Collections.Generic;
1820
using System.Management.Automation;
1921

2022
namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet
2123
{
24+
[CmdletOutputBreakingChange(
25+
deprecatedCmdletOutputTypeName: typeof(AzureSqlDatabaseModel),
26+
deprecateByVersion: "3.0.0",
27+
DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" },
28+
NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })]
2229
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabase", SupportsShouldProcess = true,ConfirmImpact = ConfirmImpact.None)]
2330
[OutputType(typeof(AzureSqlDatabaseModel))]
2431
public class GetAzureSqlDatabase : AzureSqlDatabaseCmdletBase<IEnumerable<AzureSqlDatabaseModel>>

src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,18 @@
2424
using System.Management.Automation;
2525
using System.Collections;
2626
using System.Globalization;
27+
using System;
2728

2829
namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet
2930
{
3031
/// <summary>
3132
/// Cmdlet to create a new Azure Sql Database
3233
/// </summary>
34+
[CmdletOutputBreakingChange(
35+
deprecatedCmdletOutputTypeName: typeof(AzureSqlDatabaseModel),
36+
deprecateByVersion: "3.0.0",
37+
DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" },
38+
NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })]
3339
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabase", SupportsShouldProcess = true,ConfirmImpact = ConfirmImpact.Low, DefaultParameterSetName = DtuDatabaseParameterSet), OutputType(typeof(AzureSqlDatabaseModel))]
3440
public class NewAzureSqlDatabase : AzureSqlDatabaseCmdletBase<AzureSqlDatabaseCreateOrUpdateModel>
3541
{

src/Sql/Sql/Database/Cmdlet/RemoveAzureSqlDatabase.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@
1414

1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using Microsoft.Azure.Commands.Sql.Database.Model;
17+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
18+
using System;
1719
using System.Collections.Generic;
1820
using System.Globalization;
1921
using System.Management.Automation;
2022

2123
namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet
2224
{
25+
[CmdletOutputBreakingChange(
26+
deprecatedCmdletOutputTypeName: typeof(AzureSqlDatabaseModel),
27+
deprecateByVersion: "3.0.0",
28+
DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" },
29+
NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })]
2330
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabase", SupportsShouldProcess = true), OutputType(typeof(AzureSqlDatabaseModel))]
2431
public class RemoveAzureSqlDatabase : AzureSqlDatabaseCmdletBase<IEnumerable<AzureSqlDatabaseModel>>
2532
{

src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ namespace Microsoft.Azure.Commands.Sql.Database.Cmdlet
3030
/// <summary>
3131
/// Cmdlet to create a new Azure Sql Database
3232
/// </summary>
33+
[CmdletOutputBreakingChange(
34+
deprecatedCmdletOutputTypeName: typeof(AzureSqlDatabaseModel),
35+
deprecateByVersion: "3.0.0",
36+
DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" },
37+
NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })]
3338
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabase", SupportsShouldProcess = true,ConfirmImpact = ConfirmImpact.Medium, DefaultParameterSetName = UpdateParameterSetName), OutputType(typeof(AzureSqlDatabaseModel))]
3439
public class SetAzureSqlDatabase : AzureSqlDatabaseCmdletBase<IEnumerable<AzureSqlDatabaseModel>>
3540
{

src/Sql/Sql/Replication/Cmdlet/GetAzureSqlDatabaseReplicationLink.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,18 @@
1414

1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using Microsoft.Azure.Commands.Sql.Replication.Model;
17+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
18+
using System;
1719
using System.Collections.Generic;
1820
using System.Management.Automation;
1921

2022
namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet
2123
{
24+
[CmdletOutputBreakingChange(
25+
deprecatedCmdletOutputTypeName: typeof(AzureReplicationLinkModel),
26+
deprecateByVersion: "3.0.0",
27+
DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" },
28+
NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })]
2229
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseReplicationLink", ConfirmImpact = ConfirmImpact.None, SupportsShouldProcess = true)]
2330
[OutputType(typeof(AzureReplicationLinkModel))]
2431
public class GetAzureSqlDatabaseReplicationLink : AzureSqlDatabaseSecondaryCmdletBase

src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseCopy.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,19 @@
2323
using System.Linq;
2424
using System.Management.Automation;
2525
using System.Globalization;
26+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
27+
using System;
2628

2729
namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet
2830
{
2931
/// <summary>
3032
/// Cmdlet to create a new Azure SQL Database Copy
3133
/// </summary>
34+
[CmdletOutputBreakingChange(
35+
deprecatedCmdletOutputTypeName: typeof(AzureSqlDatabaseCopyModel),
36+
deprecateByVersion: "3.0.0",
37+
DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" },
38+
NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })]
3239
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseCopy", ConfirmImpact = ConfirmImpact.Low, SupportsShouldProcess = true, DefaultParameterSetName = DtuDatabaseParameterSet), OutputType(typeof(AzureSqlDatabaseCopyModel))]
3340
public class NewAzureSqlDatabaseCopy : AzureSqlDatabaseCopyCmdletBase
3441
{

src/Sql/Sql/Replication/Cmdlet/NewAzureSqlDatabaseSecondary.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,19 @@
2323
using System.Linq;
2424
using System.Management.Automation;
2525
using System.Globalization;
26+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
27+
using System;
2628

2729
namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet
2830
{
2931
/// <summary>
3032
/// Cmdlet to create a new Azure SQL Database Secondary and Replication Link
3133
/// </summary>
34+
[CmdletOutputBreakingChange(
35+
deprecatedCmdletOutputTypeName: typeof(AzureReplicationLinkModel),
36+
deprecateByVersion: "3.0.0",
37+
DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" },
38+
NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })]
3239
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseSecondary",ConfirmImpact = ConfirmImpact.Low, SupportsShouldProcess = true, DefaultParameterSetName = DtuDatabaseParameterSet), OutputType(typeof(AzureReplicationLinkModel))]
3340
public class NewAzureSqlDatabaseSecondary : AzureSqlDatabaseSecondaryCmdletBase
3441
{

src/Sql/Sql/Replication/Cmdlet/RemoveAzureSqlDatabaseSecondary.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,18 @@
1414

1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using Microsoft.Azure.Commands.Sql.Replication.Model;
17+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
18+
using System;
1719
using System.Collections.Generic;
1820
using System.Management.Automation;
1921

2022
namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet
2123
{
24+
[CmdletOutputBreakingChange(
25+
deprecatedCmdletOutputTypeName: typeof(AzureReplicationLinkModel),
26+
deprecateByVersion: "3.0.0",
27+
DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" },
28+
NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })]
2229
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseSecondary", SupportsShouldProcess = true), OutputType(typeof(AzureReplicationLinkModel))]
2330
public class RemoveAzureSqlDatabaseSecondary : AzureSqlDatabaseSecondaryCmdletBase
2431
{

src/Sql/Sql/Replication/Cmdlet/SetAzureSqlDatabaseSecondary.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using Microsoft.Azure.Commands.Sql.Properties;
1717
using Microsoft.Azure.Commands.Sql.Replication.Model;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
19+
using System;
1820
using System.Collections.Generic;
1921
using System.Management.Automation;
2022

@@ -23,6 +25,11 @@ namespace Microsoft.Azure.Commands.Sql.Replication.Cmdlet
2325
/// <summary>
2426
/// Cmdlet to fail over Azure SQL Database Replication Link to the secondary database
2527
/// </summary>
28+
[CmdletOutputBreakingChange(
29+
deprecatedCmdletOutputTypeName: typeof(AzureReplicationLinkModel),
30+
deprecateByVersion: "3.0.0",
31+
DeprecatedOutputProperties = new String[] { "BackupStorageRedundancy" },
32+
NewOutputProperties = new String[] { "CurrentBackupStorageRedundancy", "RequestedBackupStorageRedundancy" })]
2633
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlDatabaseSecondary",DefaultParameterSetName = NoOptionsSet,ConfirmImpact = ConfirmImpact.Medium, SupportsShouldProcess = true), OutputType(typeof(AzureReplicationLinkModel))]
2734
public class SetAzureSqlDatabaseSecondary : AzureSqlDatabaseSecondaryCmdletBase
2835
{

0 commit comments

Comments
 (0)