UFRecords table getting blown away after each deployment
I have just upgraded an Umbraco 7.2.5 website from Umbraco Forms 4.1.1 to 4.1.4 and have run into an odd issue - since Umbraco Forms has been upgraded, each time the website is deployed (we use Octopus for all deployments), the UFRecords table is blown away and I've to restore the database from a backup to be able to retain form submissions.
I can confirm that that appears to be the only table that is affected - UFRecordFields, UFRecordDataString, etc all appear to be fine after a deployment.
I have tried restarting the website and recycling the app but that does not appear to trigger the clearing of the UFRecords table. All Octopus Deploy is effectively doing is copying across the website package and updating IIS so that it points to the new location.
I should also note that AppData, Media and Data (which normally sits within AppPlugins/UmbracoForms/) are set up as virtual directories on IIS so that this content can be retained across Octopus deployments.
My question: what in all of this could be blowing the UFRecords data away? It is slightly annoying that a database backup/restore needs to be a part of each deployment currently.
Hmmm no idea why that would happen, there is no code in there that would blow away tables, is it the data that is cleared or the entire table that is dropped?
Just checked the code and there is no delete statement in there, only way the records get deleted is when you delete the form, but I suppose the form is still intact?
I need to carry out a deployment on a site today (the same one Joseph is talking about) with this issue and the only workaround we have is to backup the database, deploy with Octopus then restore the database.
I've checked and there is an empty installed file in *\App_Plugins\UmbracoForms* - as Joseph asks - that needs to be there I take it?
The only folder we retain with a virtual directory when deploying is the \App_Plugins\UmbracoForms\Data folder - the rest of the UmbracoForms folder is replaced with that from source in effect. Can you see any issue with this? Is there something else that tells Umbraco to reinstall the forms?
I did some testing the weekend and found exactly the same solution. We actually had the installed (and version files for that matter) included in our source control fine. However we use TeamCity to build package our sites and that uses a nuspec definition to create a nuget package.
...which meant it would include all files, but only if they had a file extension so the installed file wasn't being packaged as it has no extension and therefore not deployed when Octopus ran.
When I changed the nuspec definition to just ** I.e.:
<file src="App_Plugins\**" target="App_Plugins"
...then the files were included and UmbracoForms stopped installing each time and all was right with the World again.
I'm still having this problem. Each time I run the InstallDatabase even the table UFRecords exists it get overriden with a new blank version.
Is there a way to preserve the values in each provision?.
Thanks
Emilio
UFRecords table getting blown away after each deployment
I have just upgraded an Umbraco 7.2.5 website from Umbraco Forms 4.1.1 to 4.1.4 and have run into an odd issue - since Umbraco Forms has been upgraded, each time the website is deployed (we use Octopus for all deployments), the UFRecords table is blown away and I've to restore the database from a backup to be able to retain form submissions.
I can confirm that that appears to be the only table that is affected - UFRecordFields, UFRecordDataString, etc all appear to be fine after a deployment.
I have tried restarting the website and recycling the app but that does not appear to trigger the clearing of the UFRecords table. All Octopus Deploy is effectively doing is copying across the website package and updating IIS so that it points to the new location.
I should also note that AppData, Media and Data (which normally sits within AppPlugins/UmbracoForms/) are set up as virtual directories on IIS so that this content can be retained across Octopus deployments.
My question: what in all of this could be blowing the UFRecords data away? It is slightly annoying that a database backup/restore needs to be a part of each deployment currently.
Comment author was deleted
Hmmm no idea why that would happen, there is no code in there that would blow away tables, is it the data that is cleared or the entire table that is dropped?
The table is still there, it just doesn't have any data in it.
Comment author was deleted
Just checked the code and there is no delete statement in there, only way the records get deleted is when you delete the form, but I suppose the form is still intact?
I've just noticed the following in the UmbracoTraceLog:
Does this help?
Yep form is still there...
Comment author was deleted
Aha that is helpfull, do you remove the install marker by any chance on the deploy, it's in \App_Plugins\UmbracoForms\installed
Hi Tim
The install marker is certainly there. Should it be?
Hi Tim,
I need to carry out a deployment on a site today (the same one Joseph is talking about) with this issue and the only workaround we have is to backup the database, deploy with Octopus then restore the database.
I've checked and there is an empty installed file in *\App_Plugins\UmbracoForms* - as Joseph asks - that needs to be there I take it?
The only folder we retain with a virtual directory when deploying is the \App_Plugins\UmbracoForms\Data folder - the rest of the UmbracoForms folder is replaced with that from source in effect. Can you see any issue with this? Is there something else that tells Umbraco to reinstall the forms?
Thanks, Paul
to get around the issue we add the "installed" file to sourec control and deploy it.
As long as the database has the tables from the original install then form records are not deleted.
No documentation on this and we did have an issue with it!
Hi Carl,
I did some testing the weekend and found exactly the same solution. We actually had the installed (and version files for that matter) included in our source control fine. However we use TeamCity to build package our sites and that uses a nuspec definition to create a nuget package.
Our entry for the App_Plugins folder was:
...which meant it would include all files, but only if they had a file extension so the installed file wasn't being packaged as it has no extension and therefore not deployed when Octopus ran.
When I changed the nuspec definition to just ** I.e.:
...then the files were included and UmbracoForms stopped installing each time and all was right with the World again.
Hi Paul, I'll keep this in mind.
At the moment we deploy with MSbuild scripts so we just need to ensure that the files are included in the solution and they get deployed.
Thanks
Carl
I'm still having this problem. Each time I run the InstallDatabase even the table UFRecords exists it get overriden with a new blank version. Is there a way to preserve the values in each provision?. Thanks Emilio
is working on a reply...