As you can see from the code above. We have added the CreateStoreTable step and there's a random GUID identifier. This is the target state value that Umbraco uses to check which step you are on. You can see it on the umbracoKeyValue table. Reference: https://bit.ly/3vTcUTe
Then we need to create the component then add it to the composition pool so every time the site boots up it will be triggered.
using Microsoft.Extensions.Logging; using Umbraco.Cms.Core.Composing; using Umbraco.Cms.Core.Scoping; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Infrastructure.Migrations; using Umbraco.Cms.Infrastructure.Migrations.Upgrade; using UmbracoProject.Migrations;
namespace Website.Core.Components {
public class CustomMigrationComponent : IComponent { private readonly IMigrationPlanExecutor migrationPlanExecutor; private readonly IScopeProvider scopeProvider; private readonly IKeyValueService keyValueService;
There's nothing much changed from Umbraco V8 they have only added ILoggerFactory as a dependency when using IComponent and I'll be writing Part 2 for this topic where we will tackle extending an existing table and changing its data type. You may also want to check the available methods of MigrationBase class to have some ideas for Altering, Deleting, etc.
Hello. I'm a web developer who specializes in Backend for about 4 years+ and working towards being a Full Stack Developer and Umbraco MVP in the future.
In my free time, I play around with the Umbraco CMS codebase a lot and picking up for grabs in the issue tracker. For me, it's like hitting two birds in one stone. I learn a lot every day and from every pull request that is being merged, it's like my way of giving back to the community and saying thanks to the developers who are maintaining Umbraco.
My vision & fundamentals
I want to make this website that can help fellow Umbracians learn a lot and get jobs. Also, I want to mention that I've been reading the Umbrajobs blogs before being an author and it helped me a lot! I want to say thanks to them and #H5YR
Follow me on social media
If you're an Umbraco professional, partner, employer, recruiter or a passionate Umbraco community builder then I'm more than happy to hear from you. Follow me on my social media channels and please reach out if you have any needs, want help or consultation with anything Umbraco related or just want a general chat.
Need help with a project but not too sure who to approach? Send us your project brief and budget. We will provide a free consultation and can help you gather quotes from the best and most suitable freelancers or agencies.
Have you got job vacancy and want to hire an Umbraco professional? Post a job on our website for free. Alternatively let us know your requirements and we will send suitable prospects your way.
Are you an Umbraco Freelance Developer or Umbraco partner that wants to advertise on our site? If you work with Umbraco or registered as an Umbraco partner then you can create a profile for free.