BlackbitDigitalCommerce / pimcore-data-director

Import Bundle for Pimcore
16 stars 3 forks source link

BUG: SQL error on bin/console data-director:complete #66

Closed kaurov closed 1 year ago

kaurov commented 1 year ago

Pimcore v.10.4.4 Data-Director v.3.2.26

command bin/console data-director:complete DataPortName 'file.xml' --rm causes SQL error:

  An exception occurred while executing 'INSERT INTO plugin_pim_importstatus (`key`,`dataport_id`,`startDate`,`lastUpdate`,`importType`,`co
  mmand_parameters`) VALUES (?,?,?,?,?,?) ON DUPLICATE KEY UPDATE `key`=VALUES(`key`),`dataport_id`=VALUES(`dataport_id`),`startDate`=VALUE
  S(`startDate`),`lastUpdate`=VALUES(`lastUpdate`),`importType`=VALUES(`importType`),`command_parameters`=VALUES(`command_parameters`)' wit
  h params ["63975b3e1e3fa0.30907703", "2", "2022-12-12 16:47:58", "2022-12-12 16:47:58", 2, "{\"--rm\":false,\"-f\":false}"]:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'dataport_id' in 'field list'
kaurov commented 1 year ago

I found myself: after version updated I need activate bundle once more:

bin/console pimcore:bundle:enable BlackbitDataDirectorBundle && bin/console pimcore:bundle:install BlackbitDataDirectorBundle

BlackbitDevs commented 1 year ago

Nice that you solved it yourself. Actually the cause was not that you had to reactivate the bundle but that bin/console pimcore:bundle:install BlackbitDataDirectorBundle runs the database migrations which created the missing column.

Beginning from version 3.3 the database migrations will get automatically executed...