magento / magento/architecture

Historical misconfiguration ?

Open
#516 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
278
Forks
146
PR merge metrics
No merged PRs in 30d

Description

Hi,

I wonder why in magento/module-catalog/etc/db_schema.xml the type for column value_id primary key is :

INT(11)

instead of INT(11) UNSIGNED ?

I found that because we occur SQLSTATE[22003]: Numeric value out of range: 167 Out of range value for column 'value_id' at row 1 at catalog product mass importation.

https://github.com/magento/magento2/blob/08f6eee62b475d44663e20c1de6419702e41eb98/app/code/Magento/Catalog/etc/db_schema.xml#L37

 <table name="catalog_product_entity_datetime" resource="default">
        <column xsi:type="int" name="value_id" padding="11" unsigned="false" nullable="false" identity="true"/>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with app/code/Magento/Catalog/etc/db_schema.xml, especially the catalog_product_entity_datetime value_id definition and its signedness. Trace the catalog product mass importation path that produces the reported SQLSTATE[22003] error, then determine the intended schema behavior and verify it with a focused reproduction or relevant database tests.

Written by the indexing model from the issue text.

Assessment

Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.