[Vtigercrm-developers] Purge / clear data

Sutharsan J ajstharsan at gmail.com
Mon Jul 1 12:32:44 GMT 2019


HI

If your database has proper foreign key constraints, it will remove all
entity data when you clear vtiger_crmentity table (i.e flush recycle bin).
Eg, For accounts

ALTER TABLE `vtiger_account`
  ADD CONSTRAINT `fk_1_vtiger_account` FOREIGN KEY (`accountid`) REFERENCES
`vtiger_crmentity` (`crmid`) ON DELETE CASCADE;

--
-- Constraints for table `vtiger_accountbillads`
--
ALTER TABLE `vtiger_accountbillads`
  ADD CONSTRAINT `fk_1_vtiger_accountbillads` FOREIGN KEY
(`accountaddressid`) REFERENCES `vtiger_account` (`accountid`) ON DELETE
CASCADE;

--
-- Constraints for table `vtiger_accountscf`
--
ALTER TABLE `vtiger_accountscf`
  ADD CONSTRAINT `fk_1_vtiger_accountscf` FOREIGN KEY (`accountid`)
REFERENCES `vtiger_account` (`accountid`) ON DELETE CASCADE;

--
-- Constraints for table `vtiger_accountshipads`
--
ALTER TABLE `vtiger_accountshipads`
  ADD CONSTRAINT `fk_1_vtiger_accountshipads` FOREIGN KEY
(`accountaddressid`) REFERENCES `vtiger_account` (`accountid`) ON DELETE
CASCADE;

Thanks
Sutharsan Jeganathan

On Thu, Jun 27, 2019 at 1:04 AM Stuart Maynard-Keene
<stuartmaynardkeene at mypubgroup.ltd> wrote:

> Hi, I have a configured install of vTiger 6.5, which over numerous years I
> have added functionality and custom fields to. I would like to duplicate
> this install to create a new version but without the existing data.
>
> By existing data, I mean leads, documents (file in /storage). I have
> already 'deleted' through the interface and emptied trash however the
> records are still in the relevant table, only flagged to 1. From a GDPR
> perspective this is also very suspect.
>
> I'm pretty conversant with the MySQL data structure and entity tables but
> I was wondering if there is a simple way to purge this data or if there is
> any sort of documentation out there to take on this task.
>
> Any advice would be grateful.
>
>
> --
>
> Cheers,
> Stu
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>


-- 









*Development Manager Radus28 Software Solution [image: Radus28 Software
Solution] 123, Level 2, Mc Larens Building Baudhaloka Mw. Colombo 04 Sri
Lanka M : +94773795291 E  : sutharsan at radus28.com <sutharsan at radus28.com> W
: www.radus28.com <http://www.radus28.com>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20190701/584f4579/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_web.png
Type: image/png
Size: 15612 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20190701/584f4579/attachment.png>


More information about the vtigercrm-developers mailing list