True confession time. I’m learning Orchard by practicing on a live patient, er, client. Let’s say I have an instance of Orchard 1.51 up and running in staging with a fair amount of client content, a specific customized third party theme, and
a set of modules, some deployed and some installed but not enabled. Let’s say I’ve played with both the WebMatrix approach and the Source enlistment approach but this running site is based on a full source set up.
Let’s say the running instance was successfully migrated from 1.4 to 1.51. Let’s say I activated Custom Forms for 1.51 but, in learning how to get it working correctly, I deleted a database record or two directly [no migration, no positive control
or recordkeeping, pure hack-and-chop methodology]. I’ve been planning to put this project into TFS Online, but I haven’t done so yet. Also, I know I need to use migrations, but I haven’t up till now.
Let’s say that my local dev copy of the project stopped compiling a week or two ago and I’ve kept modifying the staging instance via the dashboard and via direct editing of .css files and .cshtml files. Let’s say my custom forms module
is enabled but I get this error when I hit “Custom Forms” in the dashboard:
Line 58: <input type="hidden" value="@Model.CustomForms[formIndex].CustomForm.Id" name="@Html.NameOf(m => m.CustomForms[formIndex].CustomForm.Id)"/>
Line 59: <input type="checkbox" value="true" name="@Html.NameOf(m => m.CustomForms[formIndex].IsChecked)"/>
Line 60: </td>
Source File: c:\Websites\TechWise\Modules\Orchard.CustomForms\Views\Admin\Index.cshtml Line: 58
So here is my situation. I have two problems. I need to fix this error. But the larger context is that I need to gain DevOps control over this beast on a forward going basis. My question is what are the best practices
here? I would love to start fresh with a fresh source code install in my dev environment, set up source control and a structured deployment process.
The hard part comes in understanding how to separate and preserve two kinds of data that reside in the current staging database:
- Actual client data. I know that a lot of it is in Common_BodyPartRecord, but of course, a lot of it is all over the place.
- Site structuring metadata. Obviously the selected theme subdirectory is a treasure trove of this, but there is a lot more all over the place.
So, can I harvest and rebuild or do I really need to extract all relevant data from the existing structure “by hand” and rebuild and re-inject all the data?
Ps. If I learn a good DevOps pattern I will document it up for the community.