orchardcore-data-migrations

Define Orchard Core data migrations for content types and YesSql indexes.

13|3|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/CrestApps/CrestApps.AgentSkills --skill orchardcore-data-migrations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orchardcore-data-migrations
Source: https://github.com/CrestApps/CrestApps.AgentSkills/tree/main/src/CrestApps.AgentSkills.Skills/orchardcore/orchardcore-data-migrations
Command: npx skills add https://github.com/CrestApps/CrestApps.AgentSkills --skill orchardcore-data-migrations

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Orchard Core module developers need a robust, versioned approach to defining and evolving content types, parts, fields, and YesSql indexes, ensuring upgrades are predictable and safe across module versions.

Core Features & Use Cases

  • Provides templates and patterns to declare content types, parts, and fields via DataMigration.
  • Creates and alters YesSql index tables using SchemaBuilder, enabling incremental migrations.
  • Includes sample migrations demonstrating CreateAsync, UpdateFromAsync, and uninstall cleanup for feature deactivation.

Quick Start

Create a Migrations class that inherits DataMigration and implement CreateAsync to define your initial content type and YesSql index definitions.

Frequently Asked Questions about orchardcore-data-migrations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create incremental data migrations for Orchard Core content types?

Orchard Core data migrations use a class inheriting DataMigration to define content types, parts, and fields. You implement the CreateAsync method for the initial schema and use UpdateFromAsync methods for subsequent incremental updates.

How do I manage YesSql index schema updates in Orchard Core?

Manage YesSql index updates by using SchemaBuilder within your DataMigration class to create and alter index tables. This enables predictable, versioned schema changes across module upgrades.

What is the best way to evolve content definitions across Orchard Core module versions?

Evolving content definitions requires IContentDefinitionManager within DataMigration lifecycle methods. This ensures content type and part modifications are applied safely and incrementally during module version upgrades.

Can I automate uninstall cleanup when an Orchard Core feature is deactivated?

Yes, you can implement uninstall cleanup within DataMigration classes. This removes created content types, parts, and YesSql index tables when the associated Orchard Core feature is deactivated.

When do I need SchemaBuilder for Orchard Core data migrations?

SchemaBuilder is needed when your DataMigration creates or alters YesSql index tables. It handles the database schema changes required to support custom content indexes.

Do I need IContentDefinitionManager to add parts to an Orchard Core content type?

Yes, IContentDefinitionManager is required to programmatically declare and attach parts and fields to content types during the DataMigration process.