DEV Community

Daniel Cutts
Daniel Cutts

Posted on

Sanitising Umbraco Forms Live Database for Development

In this blog, we’ll walk through how to delete records from specific Umbraco Forms tables in a way that complies with GDPR, using SQL commands for manual deletion.

Why Delete Data in Umbraco Forms when in development?

GDPR (General Data Protection Regulation) emphasis user rights to privacy and control over their personal data.

Data Privacy and GDPR Compliance

  • Regulations such as the General Data Protection Regulation (GDPR) require organisations to limit access to personal data. In development environments, personal data is often more accessible to a larger number of developers, increasing the risk of a privacy breach.
  • Using real user data outside of production could violate GDPR's data minimisation, as data collected for production purposes isn’t meant to be processed in development environments.

Data Security Risks

  • Development environments are often less secure than production environments. They may lack security measures, such as encryption, access control, and monitoring, which makes them more vulnerable to breaches.
  • Using real data in a less secure environment increases the risk of accidental data exposure, hacking, or unauthorized access to sensitive user information, which could lead to severe consequences for both users and the organization.

Umbraco Forms Tables and Data Deletion

Umbraco Forms saves submitted form data in a series of tables. To fully delete user records, it’s essential to clear the information from each of these tables. Below is an overview of the tables involved in Umbraco Forms data storage:

UFRecordDataBit - Stores bit (true/false) values submitted in forms.
UFRecordDataDateTime - Stores date and time values.
UFRecordDataInteger - Stores integer data types.
UFRecordDataLongString - Stores long string values.
UFRecordDataString - Stores shorter string values.
UFRecordFields - Stores metadata related to form fields.
UFRecordWorkflowAudit - Logs workflows related to form submissions.
UFRecordAudit - Logs actions related to form records.
UFRecords - Stores the actual records of submitted forms.

To delete records related to user data, you will need to clear these tables. The commands below show you how to do this.

SQL Commands to Delete Umbraco Forms Data

To clear these tables, you can run the following SQL commands. These commands will completely delete records from each Umbraco Forms table:

DELETE FROM UFRecordDataBit;
DELETE FROM UFRecordDataDateTime;
DELETE FROM UFRecordDataInteger;
DELETE FROM UFRecordDataLongString;
DELETE FROM UFRecordDataString;
DELETE FROM UFRecordFields;
DELETE FROM UFRecordWorkflowAudit;
DELETE FROM UFRecordAudit;
DELETE FROM UFRecords;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)