DanielaWaranie DanielaWaranie - 1 year ago 84
PHP Question

Magento CLI install: in table "core_resource" column "data_version" remains null, why?

i try to install Magento 1.5.1 via cli.

As far as i can see all database tables are created with relevant content, but in table

i can see the
comming from sql dir (mysql4-data-upgrade... files) is missing. At all rows in
the column
is null. Why?

CLI is called according to the instructions here:

after installation do not help.

I can fix this by do a login to the backend SYSTEM / CACHE MANAGEMENT and refreshing of CacheType=CONFIGURATION. But how to do that via cli?

Answer Source

The installer never calles the applyAllDataUpdates() to make the installation complete. Install.php trusts that the magento downloader was used before, which does a call to applyAllDataUpdates().

But in my case i did not use the magento downloader, because i installed a magento instance from a local git repository (for buildserver, dev machine, etc.) via my own ant script. I gussed that the cli install is independend from the downloader (by design) - but here a "hidden" dependency is discovered. Running cli installer alone, setup the extensions without upgrading "data_version".

Normally you can trust in the first http call to the magento frontend / backend, which calls the applyAllDUpdates() and applyAllDataUpdates() if there is a error with the config (in cache), but in this case the cache was created successfull (extension config) by the installer - so no applyAllDataUpdates() is triggered.

I am running unit tests, integration tests and function tests (in that chain) after a build of magento (without using the downloader). I get strange behaviours if "data_version" is not poluted. My solution is to add:


to the bootstrap of my unit tests.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download