OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions What's the next step after oro:migration:load?

This topic contains 4 replies, has 3 voices, and was last updated by  pinak1161 7 years, 6 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #33574

    Rodolfo
    Participant

    Hi guys!

    What’s the next step after oro:migration:load?

    I’m following this reference: Customizing the Platform Application.

    I found other forum messages saying to use:
    php app/console oro:migration:load –force –show-queries

    But what is the next step to change my database? Clear Cache? Update Schema? Only this command will change my: vendor/oro/platform/src/Oro/Bundle/TrackingBundle/Entity/TrackingEvent.php ?

    This is what I did:
    vendor/oro/platform/src/Oro/Bundle/TrackingBundle/Migrations/Schema/v1_5/

    And this is the first 25 lines of my:
    vendor/oro/platform/src/Oro/Bundle/TrackingBundle/Migrations/Schema/OroTrackingBundleInstaller.php

    And this is my output of: php app/console oro:migration:load –force –show-queries

    Thank you!
    Oro crm-enterprise-application 1.6.1

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #33575

    Rodolfo
    Participant

    I was reading the documentation of EntityExtendBundle (https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/EntityExtendBundle/README.md) and noticed this:

    Note that you can modify only entities marked as extendable“. Is this statement valid even using migration scripts?

    How can I add a new field or modify “TrackingBundle” if this Bundle is marked as “NO EXTENDABLE”?

    Thanks!

    #33576

    Jaimy
    Participant

    Hi Rodolfo Bandeira,

    Welcome to the forum! Modifying the vendor files in vendor/oro/platform/* or vendor/oro/crm/* is not recommended at all, one of the reasons is updating. If you’re going to update the platform/crm chances are your work is gone. Beside updating and it’s not good for your mood if your work is gone, extendability and maintainability are at stake as well. So it’s not recommended to edit the files in the vendor dir directly.

    Please use the appropriate way to extend Bundles as found on the symfony site: Bundle Inheritance or Override any part of a bundle.

    To answer your question: “Note that you can modify only entities marked as extendable“. Is this statement valid even using migration scripts? => yes

    I actually went out and tried to update the tracking table which failed miserably:

    This is however on a CE 1.4.0 OroCRM install.

    So If you still want this to work you either ask the oro team very nicely if the TrackingEvent will be extendable within a certain period of time or fork the platform from github (oro team please correct me if I’m wrong, not an expert in this case) since the cookbook of symfony says it’s not possible to override entities unless they have a mapped super class Entities-entity mapping of which I’m not sure if the TrackingEvent has one.

    Hope this explains and helps in a certain way :)

    Kind Regards,

    Jaimy Casteleijn

    #33577

    Rodolfo
    Participant

    It would be a great feature if we could use all data from TrackingEvents in Customers Details. Create reports based on Tracking Entity and Web Customers Entity.

    #33578

    pinak1161
    Participant

    I create 2 bundle 1) OROCrudBundle and 2) OROEmployeeBundle.
    both bundle have own migration
    when i fire php app/console oro:migration:load –force command load only OROCRUDBundle migration ony
    and add table in database only of Crud bundle and EmplyeeBundle’s Migration not load so not added and table of EmployeeBundle

    1) OROStudBundle’s Migration

    2.OROEmployeeBundle’s Migration

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

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top