# CM version migration - Local environment setup after re-scaffolding the project

**URL:** <https://community.criticalmanufacturing.com/t/cm-version-migration-local-environment-setup-after-re-scaffolding-the-project/592>\
**Category:** Deployment\
**Tags:** installation, v11.2\
**Created:** [June 26, 2026, 9:30pm UTC](https://community.criticalmanufacturing.com/t/cm-version-migration-local-environment-setup-after-re-scaffolding-the-project/592 "2026-06-26T21:30:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Hines](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@Ben\_Hines](https://community.criticalmanufacturing.com/u/Ben_Hines)\
**Post date:** [June 26, 2026, 9:30pm UTC](https://community.criticalmanufacturing.com/t/cm-version-migration-local-environment-setup-after-re-scaffolding-the-project/592/1 "2026-06-26T21:30:50Z")

</div>

I’m working on migrating our MES from CM 11.1.5 to CM 11.2.7 and am a bit confused about the instructions. I think, perhaps, the source of my confusion is what the definitions of these two database snapshots are:

1. Post-Migration-No-Customization
2. Pre-Migration

These are mentioned [here](https://developer.criticalmanufacturing.com/explore/guides/migration/general-process/baseline/#create-post-migration-no-customization-mes-snapshot), but there is not a great deal of detail on how to capture each of these.

Here’s how I am thinking about these:

1. To build this, I need to initialize an MES environment with the target CM version (11.2.7) and take a snapshot of the database(s). The result would have absolutely none of my customizations and basically no data.
2. For this, it seems I just need to have a snapshot of my current MES environment, which would target CM 11.1.5 and have my customizations installed.

Here’s where I get confused: The [Regenerate Custom Entities](https://developer.criticalmanufacturing.com/explore/guides/migration/general-process/rescaffold/#regenerate-custom-entities-dlls) step. This shows some SQL commands that indicate to me that the database has my customizations loaded. Otherwise, the custom entities would not be present. However, the step right before this ([Setup Local Environment](https://developer.criticalmanufacturing.com/explore/guides/migration/general-process/rescaffold/#set-up-local-environment)) explicitly says to use snapshot #1 from above. This wouldn’t have any knowledge of my custom entities.

I have to misunderstanding something. Please help.

---

<div class="post-metadata">

**Author:** ![Joao\_Moreira](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@Joao\_Moreira](https://community.criticalmanufacturing.com/u/Joao_Moreira)\
**Post date:** [July 28, 2026, 11:48pm UTC](https://community.criticalmanufacturing.com/t/cm-version-migration-local-environment-setup-after-re-scaffolding-the-project/592/2 "2026-07-28T23:48:17Z")

</div>

### **The Two Snapshots**

**1. `Pre-Migration`**

**Your CM 11.1.5 environment — with all customizations and production data — captured before anything is touched.**

This is your safety net and your eventual full end-to-end test baseline. It’s used:

- As a **recovery point** if anything goes wrong
- **Later in the process** , once your migrated customization package is ready, to simulate the real production upgrade scenario from start to finish

### **2. `Post-Migration-No-Customization`**

**Your CM 11.1.5 environment’s data, upgraded to CM 11.2.7 — but without a customization package being provided during the upgrade.**

This snapshot is **not** a blank slate. It is the result of running the CM 11.2.7 installer against your existing environment (with your data). Because no customization package was supplied during that upgrade:

- Custom .NET DLLs are absent from the backend
- Custom Angular UI components are unavailable
- **But your custom entity data is still there** — the entity types and their data survived the database upgrade

This is exactly why it’s called “No-Customization” and not “No-Data” — the _code_ layer of your customizations is missing, but the _data_ (including custom entities) is present and has been migrated to the new schema.

* * *

## **How This Resolves the Confusion Around “Regenerate Custom Entities”**

The sequence now makes complete sense:

1. **Set Up Local Environment** using **`Post-Migration-No-Customization`** — you get a CM 11.2.7 environment that already has your custom entity types in **`dbo.T_EntityType`** , because they came through the database upgrade.

2. **Regenerate Custom Entities** — the SQL **`MERGE`** statement checks that those entity types are also registered in **`Services.T_GeneratedAssembly`** (so the host knows to generate DLLs for them). This is a repair step for that registration table, not a data-loading step. The entities were already there from step 1.

3. After restarting, the host auto-generates the new version-compatible DLLs, which you copy into **`Libs/EntityTypes/`**. **This is the prerequisite for migrating your backend code** , since your BE project needs to compile against these new assemblies.

4. Once backend code is migrated and installed, you can download LBOs and proceed with frontend and IoT migration.

**Note:** During scenario testing, we found that in containerized environments, the standard CM MES 11.2.7 UI gets replaced by the existing 11.1.5 customization package, since that package layer is always reinstalled until a new one is provided. Therefore, you must scaffold an HTML package targeting the new MES version — even if it contains no new components — to ensure the target version’s UI remains accessible.
