OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM Upgrade error – 1.5.0/1.7.0

This topic contains 20 replies, has 7 voices, and was last updated by  ignat 9 years, 3 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
  • #30113

    Rodolfo
    Participant

    Hi guys!

    I’m trying to upgrade (1.4.0/1.6.2) to (1.5.0/1.7.0). But I’m getting some errors:

    – Changed my composer.json to use platform/crm 1.5.0 and crm-enterprise 1.7.0
    – Ran composer.phar update –prefer-dist
    – Removed cache manually: rm -rf app/cache/*
    – Tried to update platform but nothing happens: php app/console oro:platform:update -e prod –force
    ** I got the white screen and no log files. When I ran using app_dev.php I got some errors and googled about the that. Changed my config.yml to use this:

    Tried again and finally I was able to update but I’m still having some errors:
    php app/console oro:platform:update –env=prod –force

    $ php app/console oro:platform:update –env=prod –force -vvv
    Process migrations…
    > OroCRM\Bundle\AccountBundle\Migrations\Schema\v1_6\CreateActivityAssociation
    ERROR: The table with name ‘oro_crm_ee_prod.oro_rel_46a29d19b28b6f386b70ee’ already exists.
    > OroCRM\Bundle\AccountBundle\Migrations\Schema\v1_7\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_3\CreateActivityAssociation – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_3\OroCRMCallBundle – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_4\AddCreatedAtAndUpdatedAt – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_4\OroCRMCallBundle – skipped
    > OroCRM\Bundle\ChannelBundle\Migrations\Schema\v1_3\OroCRMChannelBundle – skipped
    > OroCRM\Bundle\TaskBundle\Migrations\Schema\v1_2\CreateActivityAssociation – skipped
    > OroCRM\Bundle\TaskBundle\Migrations\Schema\v1_2\OroCRMTaskBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_3\OroCRMTaskBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_4\OroCRMTaskBundle – skipped
    > OroCRM\Bundle\AnalyticsBundle\Migrations\Schema\v1_0\OroCRMAnalyticsBundle – skipped
    > OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_13\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_14\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_15\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_23\OroCrmMagentoBundle – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_24\AddFields – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_24\OroCRMMagentoBundle – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_24\DropFields – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_25\ChangeAddressPostalCodeLength – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_25\AddRFMMetrics – skipped
    > OroPro\Bundle\OrganizationBundle\Migrations\Schema\v1_0\OroProOrganizationBundle – skipped
    > Oro\Bundle\MigrationBundle\Migration\UpdateBundleVersionMigration
    > Oro\Bundle\EntityExtendBundle\Migration\RefreshExtendCacheMigration – skipped
    > Oro\Bundle\EntityConfigBundle\Migration\UpdateEntityConfigMigration – skipped
    > Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendConfigMigration – skipped
    > Oro\Bundle\ActivityListBundle\Migration\ActivityListMigration – skipped
    > Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendIndicesMigration – skipped

    [RuntimeException]
    Failed migrations: OroCRM\Bundle\AccountBundle\Migrations\Schema\v1_6\CreateActivityAssociation.

    oro:migration:load [–force] [–dry-run] [–show-queries] [–bundles[=”…”]] [–exclude[=”…”]] [–timeout[=”…”]] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env=”…”] [–no-debug] [–jms-job-id=”…”] [–current-user=”…”] [–current-organization=”…”] [–disabled-listeners=”…”] command

    [RuntimeException]
    The command terminated with an exit code: 1.

    oro:platform:update [–force] [–timeout[=”…”]] [–symlink] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env=”…”] [–no-debug] [–jms-job-id=”…”] [–current-user=”…”] [–current-organization=”…”] [–disabled-listeners=”…”] command

    Do you guys know how to solve this? Tried to rename that table but still got other errors.
    Thanks!

Viewing 15 replies - 1 through 15 (of 20 total)
  • Author
    Replies
  • #30114

    Rodolfo
    Participant

    Oh, I didn’t see the versions 1.4.3 and 1.4.4 of platform and crm. I’m gonna try to upgrade first to these versions and then 1.5.0. I’ll let you know soon.

    #30115

    Rodolfo
    Participant

    Hi!
    I was able to upgrade Platform to 1.4.3 and 1.4.4 without any problems. But when I tried to upgrade crm/platform to 1.5.0 and crm-enterprise to 1.7.0 still getting errors.

    php app/console oro:platform:update –env=prod –force -v
    Process migrations…
    > Oro\Bundle\ActivityListBundle\Migrations\Schema\OroActivityListBundleInstaller
    ERROR: The table with name ‘oro_crm_ee_prod.oro_activity_list’ already exists.

    Removing that table, it tries to create it again and throws a new error:

    php app/console oro:platform:update –env=prod –force -v
    Process migrations…
    > Oro\Bundle\ActivityListBundle\Migrations\Schema\OroActivityListBundleInstaller
    ERROR: An exception occurred while executing ‘ALTER TABLE oro_activity_list ADD CONSTRAINT FK_B1F9F019EB185F9 FOREIGN KEY (user_owner_id) REFERENCES oro_user (id) ON DELETE SET NULL’:

    SQLSTATE[HY000]: General error: 1005 Can’t create table ‘oro_crm_ee_prod.#sql-2fb_123’ (errno: 121)

    #################################################################
    – Update composer to platform: 1.4.3
    – php ../composer.phar update –prefer-dist
    – php app/console oro:platform:update –env=prod –force -v
    – rm -rf app/cache/*
    – Tested in browser
    #################################################################
    – Update composer to platform: 1.4.4
    – php ../composer.phar update –prefer-dist
    – php app/console oro:platform:update –env=prod –force -v
    – rm -rf app/cache/*
    – Tested in browser
    #################################################################
    – Update composer to platform: 1.5.0
    – Update composer to crm: 1.5.0
    – Update composer to crm-enterprise: 1.7.0
    – php ../composer.phar update –prefer-dist
    – php app/console oro:platform:update –env=prod –force -v

    (ERROR THAT I MENTIONED BEFORE)
    Fatal error: Uncaught exception ‘Symfony\Component\Config\Definition\Exception\InvalidConfigurationException’ with message ‘Unrecognized options “prefer_extension” under “fos_rest.format_listener”‘ in /Users/rodolfobandeira/projects/orocrm/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php on line 316

    Fixed app/config/config.yml to:

    ——————————
    format_listener:
    rules:
    – prefer_extension: true
    ——————————

    – rm -rf app/cache/*
    – Tested in browser
    #################################################################

    #30116

    Rodolfo
    Participant

    Yeah, now I found the changelog of version 1.5.1. You guys changed the config.yml in this TAG. But even upgrading to this version, I’m not able to put the things working here.

    https://github.com/orocrm/platform/blame/1.5.1/UPGRADE-1.5.md

    #30117

    Hi
    fos_rest config must look like in UPGRADE-1.5.md for correct API work

    #30118

    Sergey
    Participant

    Hi, @rbandeira!

    Did you update config according to https://github.com/orocrm/platform/blame/1.5.1/UPGRADE-1.5.md that one? What error do you have now?

    #30119

    Rodolfo
    Participant

    Hi @sergey_zhuravel and @dkhrysev ! Thank you for your answers,

    I reproduced again everything from scratch copying again my production database/files. You guys can see all the steps and errors here:

    1) Changed my composer.json:

    to:

    2) Changed my app/config/config.yml according with UPGRADE-1.5.md:

    3) php ../composer.phar update –prefer-dist

    4) Removing cache and assets:

    5) php app/console oro:platform:update –env=prod –force
    Process migrations…
    > Oro\Bundle\EntityConfigBundle\Migrations\Schema\v1_4\FixOptionSetObjects
    > Oro\Bundle\ActivityBundle\Migrations\Schema\OroActivityBundleInstaller
    > Oro\Bundle\ActivityListBundle\Migrations\Schema\OroActivityListBundleInstaller
    > Oro\Bundle\BatchBundle\Migrations\Schema\v1_2\OroBatchBundle
    > Oro\Bundle\BatchBundle\Migrations\Schema\v1_3\OroBatchBundle

    [Symfony\Component\Process\Exception\RuntimeException]
    The process timed-out.

    6) Trying to run again:
    php app/console oro:platform:update –env=prod –force
    Process migrations…
    > Oro\Bundle\EntityConfigBundle\Migrations\Schema\v1_4\FixOptionSetObjects
    > Oro\Bundle\ActivityBundle\Migrations\Schema\OroActivityBundleInstaller
    > Oro\Bundle\ActivityListBundle\Migrations\Schema\OroActivityListBundleInstaller
    ERROR: The table with name ‘oro_crm_ee_prod.oro_activity_list’ already exists.
    > Oro\Bundle\BatchBundle\Migrations\Schema\v1_2\OroBatchBundle – skipped
    > Oro\Bundle\BatchBundle\Migrations\Schema\v1_3\OroBatchBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_3\AddNewColumns – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_3\OroCalendarBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_4\OroCalendarBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_5\OroCalendarBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_5\RemoveCalendarConnection – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_6\OroCalendarBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_7\OroCalendarBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_8\OroCalendarBundle – skipped
    > Oro\Bundle\ConfigBundle\Migrations\Schema\v1_1\AddNewColumns – skipped
    > Oro\Bundle\ConfigBundle\Migrations\Schema\v1_1\OroConfigBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_10\OroCRMContactBundle – skipped
    > OroCRM\Bundle\ContactBundle\Migrations\Schema\v1_11\OroCRMContactBundle – skipped
    > OroCRM\Bundle\ContactBundle\Migrations\Schema\v1_12\ChangeContactAddressPostalCodeLength – skipped
    > OroCRM\Bundle\AccountBundle\Migrations\Schema\v1_6\CreateActivityAssociation – skipped
    > OroCRM\Bundle\AccountBundle\Migrations\Schema\v1_7\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_3\CreateActivityAssociation – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_3\OroCRMCallBundle – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_4\AddCreatedAtAndUpdatedAt – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_4\OroCRMCallBundle – skipped
    > OroCRM\Bundle\ChannelBundle\Migrations\Schema\v1_3\OroCRMChannelBundle – skipped
    > OroCRM\Bundle\TaskBundle\Migrations\Schema\v1_2\CreateActivityAssociation – skipped
    > OroCRM\Bundle\TaskBundle\Migrations\Schema\v1_2\OroCRMTaskBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_3\OroCRMTaskBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_4\OroCRMTaskBundle – skipped
    > OroCRM\Bundle\AnalyticsBundle\Migrations\Schema\v1_0\OroCRMAnalyticsBundle – skipped
    > OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_13\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_14\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_15\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_23\OroCrmMagentoBundle – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_24\AddFields – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_24\OroCRMMagentoBundle – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_24\DropFields – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_25\ChangeAddressPostalCodeLength – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_25\AddRFMMetrics – skipped
    > OroPro\Bundle\OrganizationBundle\Migrations\Schema\v1_0\OroProOrganizationBundle – skipped
    > Oro\Bundle\MigrationBundle\Migration\UpdateBundleVersionMigration
    > Oro\Bundle\EntityExtendBundle\Migration\RefreshExtendCacheMigration – skipped
    > Oro\Bundle\EntityConfigBundle\Migration\UpdateEntityConfigMigration – skipped
    > Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendConfigMigration – skipped
    > Oro\Bundle\ActivityListBundle\Migration\ActivityListMigration – skipped
    > Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendIndicesMigration – skipped

    [RuntimeException]
    Failed migrations: Oro\Bundle\ActivityListBundle\Migrations\Schema\OroActivityListBundleInstaller.

    oro:migration:load [–force] [–dry-run] [–show-queries] [–bundles[=”…”]] [–exclude[=”…”]] [–timeout[=”…”]] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env=”…”] [–no-debug] [–jms-job-id=”…”] [–current-user=”…”] [–current-organization=”…”] [–disabled-listeners=”…”] command

    [RuntimeException]
    The command terminated with an exit code: 1.

    #30120

    Julien VINAI
    Participant

    Hi Rodolfo,

    I’m only an OroCRM partner developer from Synolia but yesterday I upgraded a client instance with this procedure (I wish that you installed OroCRM with GIT method):
    – First of all make a git pull and verify that you have desired tag with git tags
    – Then git checkout tags/name_of_the_tag
    – And finally follow this : https://github.com/orocrm/crm/blob/master/UPGRADE.md

    It worked for me.

    Don’t try to “just” update your composer.json. Because a lot of things come with a new version. Like Dmitry said for example, you will have to update your config.yml. If you use this method, you don’t have to :)

    If you make some changes on the repository. Just stash them with git stash, checkout the tag and apply them back with git stash pop.


    SYNOLIA – Lead Developer

    #30121

    Rodolfo
    Participant

    Hi @julien_vinai,

    Thanks for your answer! Actually I just repeated the same procedure that @ignat said to me in the last problem that I got trying to upgrade: Someone managed to upgrade ORO to 1.6.1 or 1.6.2 without any errors?

    I’ll try as you said! I’ll need to add ‘git remote add’ and pull from that, and push to my repo. Thank you!

    #30122

    Rodolfo
    Participant

    @julien_vinai, I did what you suggest and I’m still getting the same problem. It fails first when tries to migrate “v1_3\OroBatchBundle”

    I was looking in the code of that schema/migration and it deals with two tables.

    And here is the quantity of rows that I have in these tables:

    #30123

    Rodolfo
    Participant

    Solved that timeout error adding –timeout=3600

    So, now I’m getting only that CreateActivityAssociation error:

    php app/console oro:platform:update –env=prod –force –timeout=3600

    Process migrations…
    > Oro\Bundle\EntityConfigBundle\Migrations\Schema\v1_4\FixOptionSetObjects
    > Oro\Bundle\ActivityBundle\Migrations\Schema\OroActivityBundleInstaller
    > Oro\Bundle\ActivityListBundle\Migrations\Schema\OroActivityListBundleInstaller
    > Oro\Bundle\BatchBundle\Migrations\Schema\v1_2\OroBatchBundle
    > Oro\Bundle\BatchBundle\Migrations\Schema\v1_3\OroBatchBundle
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_3\AddNewColumns
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_3\OroCalendarBundle
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_4\OroCalendarBundle
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_5\OroCalendarBundle
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_5\RemoveCalendarConnection
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_6\OroCalendarBundle
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_7\OroCalendarBundle
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_8\OroCalendarBundle
    > Oro\Bundle\ConfigBundle\Migrations\Schema\v1_1\AddNewColumns
    > Oro\Bundle\ConfigBundle\Migrations\Schema\v1_1\OroConfigBundle
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_10\OroCRMContactBundle
    > OroCRM\Bundle\ContactBundle\Migrations\Schema\v1_11\OroCRMContactBundle
    > OroCRM\Bundle\ContactBundle\Migrations\Schema\v1_12\ChangeContactAddressPostalCodeLength
    > OroCRM\Bundle\AccountBundle\Migrations\Schema\v1_6\CreateActivityAssociation
    ERROR: The table with name ‘oro_crm_ee_prod.oro_rel_46a29d19b28b6f386b70ee’ already exists.

    > OroCRM\Bundle\AccountBundle\Migrations\Schema\v1_7\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_3\CreateActivityAssociation – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_3\OroCRMCallBundle – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_4\AddCreatedAtAndUpdatedAt – skipped
    > OroCRM\Bundle\CallBundle\Migrations\Schema\v1_4\OroCRMCallBundle – skipped
    > OroCRM\Bundle\ChannelBundle\Migrations\Schema\v1_3\OroCRMChannelBundle – skipped
    > OroCRM\Bundle\TaskBundle\Migrations\Schema\v1_2\CreateActivityAssociation – skipped
    > OroCRM\Bundle\TaskBundle\Migrations\Schema\v1_2\OroCRMTaskBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_3\OroCRMTaskBundle – skipped
    > Oro\Bundle\CalendarBundle\Migrations\Schema\v1_4\OroCRMTaskBundle – skipped
    > OroCRM\Bundle\AnalyticsBundle\Migrations\Schema\v1_0\OroCRMAnalyticsBundle – skipped
    > OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_13\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_14\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_15\OroCRMSalesBundle – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_23\OroCrmMagentoBundle – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_24\AddFields – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_24\OroCRMMagentoBundle – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_24\DropFields – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_25\ChangeAddressPostalCodeLength – skipped
    > OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_25\AddRFMMetrics – skipped
    > OroPro\Bundle\OrganizationBundle\Migrations\Schema\v1_0\OroProOrganizationBundle – skipped
    > Oro\Bundle\MigrationBundle\Migration\UpdateBundleVersionMigration
    > Oro\Bundle\EntityExtendBundle\Migration\RefreshExtendCacheMigration – skipped
    > Oro\Bundle\EntityConfigBundle\Migration\UpdateEntityConfigMigration – skipped
    > Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendConfigMigration – skipped
    > Oro\Bundle\ActivityListBundle\Migration\ActivityListMigration – skipped
    > Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendIndicesMigration – skipped

    [RuntimeException]
    Failed migrations: OroCRM\Bundle\AccountBundle\Migrations\Schema\v1_6\CreateActivityAssociation.

    [RuntimeException]
    The command terminated with an exit code: 1.

    #30124

    Rodolfo
    Participant

    How can I just skip a specific bundle from the migration process?

    #30125

    Dima Soroka
    Keymaster

    What would be the reason for this?
    You can have additional checks and validations inside the migration script.

    #30126

    Rodolfo
    Participant

    @Soroka The reason is upgrade my oro instance.. Do you know any tip to solve the problem described above?

    #30127

    Rodolfo
    Participant

    Hi @sergey_zhuravel, @dkhrysev, @Soroka !

    Do you guys have any Idea how can I upgrade it? I can’t lost my old data and I really need that new feature that makes oro-tracking extendable.

    Thanks!

    #30128

    Yevhen Shyshkin
    Participant

    Hello, Rodolfo.

    You can disable bundles using “exclude” option of “oro:migration:load” or simply exclude some bundles during migration. Then you have to set correct bundle version in oro_migrations table to prevent disabled migrations from executing.

    The eaisest fix is to comment not required sections of migrations and then roll back changes.

    But all these actions should not be performed in production environment because they might break DB structure or metadata.

Viewing 15 replies - 1 through 15 (of 20 total)

The forum ‘OroCRM’ is closed to new topics and replies.

Back to top