ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 4 replies, has 3 voices, and was last updated by Dima Soroka Dima Soroka 2 years, 9 months ago.

  • Creator
    Topic
  • #5320
    Hiro
    Hiro
    Participant

    When I remove a field from Entity Class and apply the change to the database I do the followings:

    When I do that the field data is left in the tables “oro_entity_config_xxx” (e.g. oro_entity_config_field) and I manually have to delete the records as being troubled with the foreign keys.

    I know “php app/console oro:entity-config:xxx” commands take care when I add a new field and they do not when I delete a field.

    What is the proper way to update those tables after deleting a field?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #5430
    Dima Soroka
    Dima Soroka
    Oro Core

    Unfortunately this functionality is not supported yet and we are going to complete it soon. The workaround as for now is to do cleanup manually with migration scripts or regenerate the schema if you are not in production yet.

    #5431
    Hiro
    Hiro
    Participant

    Thank you for the reply.

    The problem when I tried with regenerating the schema was that the old migration scripts include some updates for Entity Config data.

    Those are not taken care by the command “php app/console oro:entity-config:xxx”.

    When I deleted all the records from Entity Config related tables and executed the commands, I could not have replicated the latest table structure (e.g. The one related to Attachment feature etc).

    I had to make OroCRM think the newest migration has not been applied for the bundle by updating the migration history table and temporally changed the code in the latest migration script to update the schema to make “php app/console oro:entity-config:xxx” work.

    So currently I plan to create the migration script if I have to remove a field from Entity as I assume that would take less time.

    #6042

    Ximousse
    Participant

    Hi,

    I’ve been facing the same problem, any news about “php app/console oro:entity-config:xxx” being functional ?

    #6083
    Dima Soroka
    Dima Soroka
    Oro Core

    We scheduled field removal support for December so far.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.