magento2: Declarative schema bug : default value cannot be negative on signed int
Preconditions (*)
Magento 2.4.1
Steps to reproduce (*)
Create a table with thoses columns :
<column xsi:type="int" name="some_name" unsigned="false" nullable="false" identity="false" default="-1" comment="Some Name"/>
Note that unsigned is set to false.
Expected result (*)
Table is created
Actual result (*)
Element 'column', attribute 'default': [facet 'pattern'] The value '-1' is not accepted by the pattern '\d+|null'.
Additional Information
Attaching module which helps in issue reproduction: Magz.zip
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround. (When migrating from M1 for instance)
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 21 (12 by maintainers)
Hello @sufyanrightpoint @Nuranto,
Thanks for the report and collaboration!
We are able to reproduce the issue in the latest development branch i.e 2.4-develop with the provided steps. As a piece of additional information, we are attaching the module which helps in the reproduction of the issue.
Thanks