deleted fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ctheuring
    Senior Member
    • Oct 2022
    • 138

    deleted fields

    Entity-manager -> I delete a field of an entity.
    If I show the table in a databaseManager (here DBWorkbench6) the field is still there.
    Is this correct - meens espo didn't delete the field really and only marked it as deleted (same as deleted rows)?
    Can a delete the field with the help of my databaseManager (to keep the database slight)?

    Christoph
  • ThomasB
    Senior Member
    • Mar 2022
    • 163

    #2
    Yes, EspoCRM first flags items as deleted, when you delete something.

    If you check the option "Clean up deleted records​" in the misc section of the settings in the admin panel, the clean-up job will delete those items.

    However there is also this setting:



    cleanupDeletedRecordsPeriod – '3 months' – complete deletion of records that were marked as deleted (deleted = 1);​

    If you dont specify another time in the config file, the deletion of those items will only happen when 3 months have passed. This is the default and you have to add the line to the config file.

    Comment

    • victor
      Active Community Member
      • Aug 2022
      • 729

      #3
      I can only add to ThomasB's answer that Clean up deleted records applies only to deleted records, and not to the fields that you created in Entity Manager. If you need to delete them as well, then it should be done, for example, through phpMyAdmin.
      Last edited by victor; 08-16-2023, 09:53 AM.

      Comment

      • rabii
        Active Community Member
        • Jun 2016
        • 1250

        #4
        Originally posted by ctheuring
        Entity-manager -> I delete a field of an entity.
        If I show the table in a databaseManager (here DBWorkbench6) the field is still there.
        Is this correct - meens espo didn't delete the field really and only marked it as deleted (same as deleted rows)?
        Can a delete the field with the help of my databaseManager (to keep the database slight)?

        Christoph
        As of version 7.4 there is a command that will delete unused fields from database.

        PHP Code:
        php command.php rebuild --hard 
        
        Read more about it here https://docs.espocrm.com/administrat.../#hard-rebuild
        Rabii
        Web Dev

        Comment

        Working...