Skip to content

Commit

Permalink
fix Migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudroy97 committed Dec 22, 2021
1 parent b492348 commit c797a82
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/Apps/StatCan.OrchardCore.Candev/Migrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public async Task<int> CreateAsync()
await _recipeMigrator.ExecuteAsync("roles.recipe.json", this);
await _recipeMigrator.ExecuteAsync("role-judge.recipe.json", this);

return 2;
return 3;
}

private void CreateHackathonCustomSetings()
Expand Down Expand Up @@ -617,5 +617,23 @@ public int UpdateFrom1()

return 2;
}

public int UpdateFrom2()
{
_contentDefinitionManager.AlterPartDefinition("TeamCustomSettings", part => part
.WithField("IsFinalRound", field => field
.OfType("BooleanField")
.WithDisplayName("Is final round")
.WithEditor("Switch")
.WithPosition("0")
.WithSettings(new BooleanFieldSettings
{
Label = "True when it's the final round of judging",
})
)
);

return 3;
}
}
}

0 comments on commit c797a82

Please sign in to comment.