I have a missing column exception when trying to add a product to the basket

Developer Posts: 6 🧑🏻‍🚀 - Cadet

In b2b and in b2c as well when I try to add a product to the basket I have exception Column not found: 1054 Unknown column 'spy_product_abstract.pyz_color_code' in 'field list'","code".

It seems that column is in file: spy_product.schema

<?xml version="1.0"?><database xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="zed" xsi:noNamespaceSchemaLocation="http://xsd.propelorm.org/1.6/database.xsd" namespace="Orm\Zed\Product\Persistence" package="src.Orm.Zed.Product.Persistence">
    <table name="spy_product_abstract" idMethod="native" allowPkInsert="true" phpName="SpyProductAbstract">        <column name="pyz_color_code" required="false" type="VARCHAR" default="NULL" size="8"/>    </table>
</database>

How I could fix this exception?

Answers

  • SSA Sprykee Posts: 83 🪐 - Explorer

    hi, emiltotsev! (sorry cannot guess your name from the nick)

    Missing columns usually means not updated Database structure after update of the definitions.

    To update the DB, please run

    console propel:install

    for the store that you're testing, since this command is only changing the DB of the current store.

    Please check our documentation for more details:

    Site faviconDatabase schema definition | Spryker Documentation

Welcome!

It looks like you're new here. Sign in or register to get started.