London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
We have a block which used to have a property called "Title" that we've now renamed to "Heading" instead. We implemented this change and tested it and then figured that we should also add a migration to move the old title to the new property.
For this we created a miagration that inherited from MigrationStep like this.
public class HeroBlockRenameTitleToHeading : MigrationStep { public override void AddChanges() { ContentType("HeroBlock").Property("Heading").UsedToBeNamed("Title"); } }
But when we then start our project again this is logged.
[13:08:31 WRN] [] Page type model synchronizer couldn't save a property definition. A property with name "Heading" already exists
Not sure what to do here, of course it exists since the content type is generated from code. Also, if I change to another name in the migration (like"Header") it is run without problems but it doesn't create a new property so I'm not sure at all how to proceed here.