using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional namespace Microsoft.SelfService.Portal.Core.API.Migrations { /// public partial class AddTemplateRevisionArtifactsAndCredentialStore : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "TemplateRole", table: "DeploymentTemplateSelections", type: "nvarchar(max)", nullable: false, oldClrType: typeof(string), oldType: "nvarchar(max)") .Annotation("Relational:ColumnOrder", 4) .OldAnnotation("Relational:ColumnOrder", 3); migrationBuilder.AlterColumn( name: "SortOrder", table: "DeploymentTemplateSelections", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("Relational:ColumnOrder", 5) .OldAnnotation("Relational:ColumnOrder", 4); migrationBuilder.AlterColumn( name: "Alias", table: "DeploymentTemplateSelections", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true) .Annotation("Relational:ColumnOrder", 6) .OldAnnotation("Relational:ColumnOrder", 5); migrationBuilder.AddColumn( name: "TemplateRevisionId", table: "DeploymentTemplateSelections", type: "uniqueidentifier", nullable: true) .Annotation("Relational:ColumnOrder", 3); migrationBuilder.AlterColumn( name: "Status", table: "DeploymentExecutions", type: "nvarchar(max)", nullable: false, oldClrType: typeof(string), oldType: "nvarchar(max)") .Annotation("Relational:ColumnOrder", 6) .OldAnnotation("Relational:ColumnOrder", 4); migrationBuilder.AlterColumn( name: "JSONData", table: "DeploymentExecutions", type: "nvarchar(max)", nullable: false, oldClrType: typeof(string), oldType: "nvarchar(max)") .Annotation("Relational:ColumnOrder", 7) .OldAnnotation("Relational:ColumnOrder", 5); migrationBuilder.AddColumn( name: "CurrentArtifactId", table: "DeploymentExecutions", type: "uniqueidentifier", nullable: true) .Annotation("Relational:ColumnOrder", 5); migrationBuilder.AddColumn( name: "OverridesJson", table: "DeploymentExecutions", type: "nvarchar(max)", nullable: true) .Annotation("Relational:ColumnOrder", 8); migrationBuilder.AddColumn( name: "SourceJson", table: "DeploymentExecutions", type: "nvarchar(max)", nullable: true) .Annotation("Relational:ColumnOrder", 9); migrationBuilder.AddColumn( name: "TemplateRevisionId", table: "DeploymentExecutions", type: "uniqueidentifier", nullable: true) .Annotation("Relational:ColumnOrder", 4); migrationBuilder.CreateTable( name: "CredentialSecrets", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), Name = table.Column(type: "nvarchar(450)", nullable: false), UserName = table.Column(type: "nvarchar(max)", nullable: true), SecretValue = table.Column(type: "nvarchar(max)", nullable: false), SecretType = table.Column(type: "nvarchar(max)", nullable: false), MetadataJson = table.Column(type: "nvarchar(max)", nullable: true), IsEnabled = table.Column(type: "bit", nullable: false), Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_CredentialSecrets", x => x.Id); table.CheckConstraint("CK_CredentialSecrets_MetadataJson_IsJson", "[MetadataJson] IS NULL OR ISJSON([MetadataJson]) = 1"); }); migrationBuilder.CreateTable( name: "DeploymentArtifacts", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), DeploymentGroupId = table.Column(type: "uniqueidentifier", nullable: false), DeploymentTargetId = table.Column(type: "uniqueidentifier", nullable: true), TargetId = table.Column(type: "uniqueidentifier", nullable: true), ArtifactType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Status = table.Column(type: "nvarchar(max)", nullable: false), DeploymentJson = table.Column(type: "nvarchar(max)", nullable: false), SourceJson = table.Column(type: "nvarchar(max)", nullable: true), ResolvedJson = table.Column(type: "nvarchar(max)", nullable: true), SourceSnapshotJson = table.Column(type: "nvarchar(max)", nullable: true), InputHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), OutputHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), IsStale = table.Column(type: "bit", nullable: false), StaleReasonJson = table.Column(type: "nvarchar(max)", nullable: true), Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_DeploymentArtifacts", x => x.Id); table.CheckConstraint("CK_DeploymentArtifacts_DeploymentJson_IsJson", "ISJSON([DeploymentJson]) = 1"); table.CheckConstraint("CK_DeploymentArtifacts_ResolvedJson_IsJson", "[ResolvedJson] IS NULL OR ISJSON([ResolvedJson]) = 1"); table.CheckConstraint("CK_DeploymentArtifacts_SourceJson_IsJson", "[SourceJson] IS NULL OR ISJSON([SourceJson]) = 1"); table.CheckConstraint("CK_DeploymentArtifacts_SourceSnapshotJson_IsJson", "[SourceSnapshotJson] IS NULL OR ISJSON([SourceSnapshotJson]) = 1"); table.ForeignKey( name: "FK_DeploymentArtifacts_DeploymentBatches_DeploymentGroupId", column: x => x.DeploymentGroupId, principalTable: "DeploymentBatches", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_DeploymentArtifacts_DeploymentExecutions_TargetId_DeploymentGroupId", columns: x => new { x.TargetId, x.DeploymentGroupId }, principalTable: "DeploymentExecutions", principalColumns: new[] { "TargetId", "DeploymentBatchId" }); table.ForeignKey( name: "FK_DeploymentArtifacts_Targets_TargetId", column: x => x.TargetId, principalTable: "Targets", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "TemplateRevisions", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), TemplateVersionId = table.Column(type: "uniqueidentifier", nullable: false), RevisionNumber = table.Column(type: "int", nullable: false), JsonData = table.Column(type: "nvarchar(max)", nullable: false), JsonHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), SchemaVersion = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), IsCurrent = table.Column(type: "bit", nullable: false), IsPublished = table.Column(type: "bit", nullable: false), PublishedAt = table.Column(type: "datetime2", nullable: true), PublishedBy = table.Column(type: "nvarchar(max)", nullable: true), Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_TemplateRevisions", x => x.Id); table.CheckConstraint("CK_TemplateRevisions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); table.ForeignKey( name: "FK_TemplateRevisions_TemplateVersions_TemplateVersionId", column: x => x.TemplateVersionId, principalTable: "TemplateVersions", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "ConfigurationDefinitions", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), TemplateRevisionId = table.Column(type: "uniqueidentifier", nullable: true), Kind = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), Name = table.Column(type: "nvarchar(450)", nullable: false), PropertiesJson = table.Column(type: "nvarchar(max)", nullable: false), DefinitionHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_ConfigurationDefinitions", x => x.Id); table.CheckConstraint("CK_ConfigurationDefinitions_PropertiesJson_IsJson", "ISJSON([PropertiesJson]) = 1"); table.ForeignKey( name: "FK_ConfigurationDefinitions_TemplateRevisions_TemplateRevisionId", column: x => x.TemplateRevisionId, principalTable: "TemplateRevisions", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "ConfigurationValues", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), ConfigurationDefinitionId = table.Column(type: "uniqueidentifier", nullable: false), ScopeType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), ScopeId = table.Column(type: "uniqueidentifier", nullable: false), ValueSourceType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), SourcePath = table.Column(type: "nvarchar(max)", nullable: true), ValueJson = table.Column(type: "nvarchar(max)", nullable: true), ValueHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), SortOrder = table.Column(type: "int", nullable: false), Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_ConfigurationValues", x => x.Id); table.CheckConstraint("CK_ConfigurationValues_ValueJson_IsJson", "[ValueJson] IS NULL OR ISJSON([ValueJson]) = 1"); table.ForeignKey( name: "FK_ConfigurationValues_ConfigurationDefinitions_ConfigurationDefinitionId", column: x => x.ConfigurationDefinitionId, principalTable: "ConfigurationDefinitions", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.UpdateData( table: "DeploymentExecutions", keyColumns: new[] { "DeploymentBatchId", "TargetId" }, keyValues: new object[] { new Guid("80000000-0000-0000-0000-000000000001"), new Guid("30000000-0000-0000-0000-000000000004") }, columns: new[] { "CurrentArtifactId", "OverridesJson", "SourceJson", "TemplateRevisionId" }, values: new object[] { null, null, null, new Guid("72000000-0000-0000-0000-000000000003") }); migrationBuilder.UpdateData( table: "DeploymentExecutions", keyColumns: new[] { "DeploymentBatchId", "TargetId" }, keyValues: new object[] { new Guid("80000000-0000-0000-0000-000000000001"), new Guid("30000000-0000-0000-0000-000000000005") }, columns: new[] { "CurrentArtifactId", "OverridesJson", "SourceJson", "TemplateRevisionId" }, values: new object[] { null, null, null, new Guid("72000000-0000-0000-0000-000000000003") }); migrationBuilder.UpdateData( table: "DeploymentExecutions", keyColumns: new[] { "DeploymentBatchId", "TargetId" }, keyValues: new object[] { new Guid("80000000-0000-0000-0000-000000000101"), new Guid("30000000-0000-0000-0000-000000000101") }, columns: new[] { "CurrentArtifactId", "OverridesJson", "SourceJson", "TemplateRevisionId" }, values: new object[] { null, null, null, new Guid("72000000-0000-0000-0000-000000000103") }); migrationBuilder.UpdateData( table: "DeploymentExecutions", keyColumns: new[] { "DeploymentBatchId", "TargetId" }, keyValues: new object[] { new Guid("80000000-0000-0000-0000-000000000101"), new Guid("30000000-0000-0000-0000-000000000102") }, columns: new[] { "CurrentArtifactId", "OverridesJson", "SourceJson", "TemplateRevisionId" }, values: new object[] { null, null, null, new Guid("72000000-0000-0000-0000-000000000103") }); migrationBuilder.UpdateData( table: "DeploymentExecutions", keyColumns: new[] { "DeploymentBatchId", "TargetId" }, keyValues: new object[] { new Guid("80000000-0000-0000-0000-000000000101"), new Guid("30000000-0000-0000-0000-000000000103") }, columns: new[] { "CurrentArtifactId", "OverridesJson", "SourceJson", "TemplateRevisionId" }, values: new object[] { null, null, null, new Guid("72000000-0000-0000-0000-000000000103") }); migrationBuilder.UpdateData( table: "DeploymentTemplateSelections", keyColumn: "Id", keyValue: new Guid("82000000-0000-0000-0000-000000000001"), column: "TemplateRevisionId", value: new Guid("72000000-0000-0000-0000-000000000003")); migrationBuilder.UpdateData( table: "DeploymentTemplateSelections", keyColumn: "Id", keyValue: new Guid("82000000-0000-0000-0000-000000000101"), column: "TemplateRevisionId", value: new Guid("72000000-0000-0000-0000-000000000101")); migrationBuilder.UpdateData( table: "DeploymentTemplateSelections", keyColumn: "Id", keyValue: new Guid("82000000-0000-0000-0000-000000000102"), column: "TemplateRevisionId", value: new Guid("72000000-0000-0000-0000-000000000102")); migrationBuilder.UpdateData( table: "DeploymentTemplateSelections", keyColumn: "Id", keyValue: new Guid("82000000-0000-0000-0000-000000000103"), column: "TemplateRevisionId", value: new Guid("72000000-0000-0000-0000-000000000103")); migrationBuilder.UpdateData( table: "DeploymentTemplateSelections", keyColumn: "Id", keyValue: new Guid("82000000-0000-0000-0000-000000000104"), column: "TemplateRevisionId", value: new Guid("72000000-0000-0000-0000-000000000104")); migrationBuilder.InsertData( table: "TemplateRevisions", columns: new[] { "Id", "Created", "CreatedBy", "IsCurrent", "IsPublished", "JsonData", "JsonHash", "Modified", "ModifiedBy", "PublishedAt", "PublishedBy", "RevisionNumber", "SchemaVersion", "TemplateVersionId" }, values: new object[,] { { new Guid("72000000-0000-0000-0000-000000000001"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000001") }, { new Guid("72000000-0000-0000-0000-000000000002"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000002") }, { new Guid("72000000-0000-0000-0000-000000000003"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000003") }, { new Guid("72000000-0000-0000-0000-000000000004"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000004") }, { new Guid("72000000-0000-0000-0000-000000000101"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000101") }, { new Guid("72000000-0000-0000-0000-000000000102"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000102") }, { new Guid("72000000-0000-0000-0000-000000000103"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000103") }, { new Guid("72000000-0000-0000-0000-000000000104"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000104") } }); migrationBuilder.CreateIndex( name: "IX_DeploymentTemplateSelections_TemplateRevisionId", table: "DeploymentTemplateSelections", column: "TemplateRevisionId"); migrationBuilder.CreateIndex( name: "IX_DeploymentExecutions_CurrentArtifactId", table: "DeploymentExecutions", column: "CurrentArtifactId"); migrationBuilder.CreateIndex( name: "IX_DeploymentExecutions_TemplateRevisionId", table: "DeploymentExecutions", column: "TemplateRevisionId"); migrationBuilder.CreateIndex( name: "IX_ConfigurationDefinitions_TemplateRevisionId_Kind_Name", table: "ConfigurationDefinitions", columns: new[] { "TemplateRevisionId", "Kind", "Name" }, unique: true, filter: "[TemplateRevisionId] IS NOT NULL"); migrationBuilder.CreateIndex( name: "IX_ConfigurationValues_ConfigurationDefinitionId_ScopeType_ScopeId_SortOrder", table: "ConfigurationValues", columns: new[] { "ConfigurationDefinitionId", "ScopeType", "ScopeId", "SortOrder" }); migrationBuilder.CreateIndex( name: "IX_CredentialSecrets_Name", table: "CredentialSecrets", column: "Name", unique: true); migrationBuilder.CreateIndex( name: "IX_DeploymentArtifacts_DeploymentGroupId", table: "DeploymentArtifacts", column: "DeploymentGroupId"); migrationBuilder.CreateIndex( name: "IX_DeploymentArtifacts_TargetId_DeploymentGroupId", table: "DeploymentArtifacts", columns: new[] { "TargetId", "DeploymentGroupId" }); migrationBuilder.CreateIndex( name: "IX_TemplateRevisions_TemplateVersionId", table: "TemplateRevisions", column: "TemplateVersionId", unique: true, filter: "[IsCurrent] = 1"); migrationBuilder.CreateIndex( name: "IX_TemplateRevisions_TemplateVersionId_RevisionNumber", table: "TemplateRevisions", columns: new[] { "TemplateVersionId", "RevisionNumber" }, unique: true); migrationBuilder.AddForeignKey( name: "FK_DeploymentExecutions_DeploymentArtifacts_CurrentArtifactId", table: "DeploymentExecutions", column: "CurrentArtifactId", principalTable: "DeploymentArtifacts", principalColumn: "Id"); migrationBuilder.AddForeignKey( name: "FK_DeploymentExecutions_TemplateRevisions_TemplateRevisionId", table: "DeploymentExecutions", column: "TemplateRevisionId", principalTable: "TemplateRevisions", principalColumn: "Id", onDelete: ReferentialAction.Restrict); migrationBuilder.AddForeignKey( name: "FK_DeploymentTemplateSelections_TemplateRevisions_TemplateRevisionId", table: "DeploymentTemplateSelections", column: "TemplateRevisionId", principalTable: "TemplateRevisions", principalColumn: "Id", onDelete: ReferentialAction.Restrict); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_DeploymentExecutions_DeploymentArtifacts_CurrentArtifactId", table: "DeploymentExecutions"); migrationBuilder.DropForeignKey( name: "FK_DeploymentExecutions_TemplateRevisions_TemplateRevisionId", table: "DeploymentExecutions"); migrationBuilder.DropForeignKey( name: "FK_DeploymentTemplateSelections_TemplateRevisions_TemplateRevisionId", table: "DeploymentTemplateSelections"); migrationBuilder.DropTable( name: "ConfigurationValues"); migrationBuilder.DropTable( name: "CredentialSecrets"); migrationBuilder.DropTable( name: "DeploymentArtifacts"); migrationBuilder.DropTable( name: "ConfigurationDefinitions"); migrationBuilder.DropTable( name: "TemplateRevisions"); migrationBuilder.DropIndex( name: "IX_DeploymentTemplateSelections_TemplateRevisionId", table: "DeploymentTemplateSelections"); migrationBuilder.DropIndex( name: "IX_DeploymentExecutions_CurrentArtifactId", table: "DeploymentExecutions"); migrationBuilder.DropIndex( name: "IX_DeploymentExecutions_TemplateRevisionId", table: "DeploymentExecutions"); migrationBuilder.DropColumn( name: "TemplateRevisionId", table: "DeploymentTemplateSelections"); migrationBuilder.DropColumn( name: "CurrentArtifactId", table: "DeploymentExecutions"); migrationBuilder.DropColumn( name: "OverridesJson", table: "DeploymentExecutions"); migrationBuilder.DropColumn( name: "SourceJson", table: "DeploymentExecutions"); migrationBuilder.DropColumn( name: "TemplateRevisionId", table: "DeploymentExecutions"); migrationBuilder.AlterColumn( name: "TemplateRole", table: "DeploymentTemplateSelections", type: "nvarchar(max)", nullable: false, oldClrType: typeof(string), oldType: "nvarchar(max)") .Annotation("Relational:ColumnOrder", 3) .OldAnnotation("Relational:ColumnOrder", 4); migrationBuilder.AlterColumn( name: "SortOrder", table: "DeploymentTemplateSelections", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("Relational:ColumnOrder", 4) .OldAnnotation("Relational:ColumnOrder", 5); migrationBuilder.AlterColumn( name: "Alias", table: "DeploymentTemplateSelections", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true) .Annotation("Relational:ColumnOrder", 5) .OldAnnotation("Relational:ColumnOrder", 6); migrationBuilder.AlterColumn( name: "Status", table: "DeploymentExecutions", type: "nvarchar(max)", nullable: false, oldClrType: typeof(string), oldType: "nvarchar(max)") .Annotation("Relational:ColumnOrder", 4) .OldAnnotation("Relational:ColumnOrder", 6); migrationBuilder.AlterColumn( name: "JSONData", table: "DeploymentExecutions", type: "nvarchar(max)", nullable: false, oldClrType: typeof(string), oldType: "nvarchar(max)") .Annotation("Relational:ColumnOrder", 5) .OldAnnotation("Relational:ColumnOrder", 7); } } }