[Vtigercrm-developers] Purge / clear data

Sutharsan J ajstharsan at gmail.com
Wed Jul 3 05:52:39 GMT 2019


 Correct, but i fetched this queries from a latest version db dump, comes
usually at the bottom, and ran it in the upgraded version's db. Then purged
crmentity.

On Mon, Jul 1, 2019, 6:43 PM Alan Lord <alanslists at gmail.com> wrote:

> On 01/07/2019 13:32, Sutharsan J wrote:
> > 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;
>
> This is correct but these were only added relatively recently to the
> migration scripts. If you are upgrading and you have inconsistent row
> ids between any of the tables these constraints fail.
>
>
> http://code.vtiger.com/vtiger/vtigercrm/issues/1073
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20190703/c05a3d1b/attachment.html>


More information about the vtigercrm-developers mailing list