Skip to content

Commit 36f5b5c

Browse files
jhruehlp-bystritsky
authored andcommitted
increase length of sequence_table column in sales_sequence_meta table
Having a too small length for the sequence_table column can lead to integrity constraint errors on setup:upgrade, because longer table names will be cut off at least the store id suffix of those sales sequence table names. In our case it was the postfinance extension, which lead to the table names "sequence_postfinancecw_transaction_0" and "sequence_postfinancecw_transaction_1", which are 36 characters long. So the name got cut off and as a consequence lead to an integrity constrained, when the recurring script in the Magento_SalesSequence module tries to add the meta data for the sequence_postfinancecw_transaction_1 table. So a character length of only 32 is definitely not long enough. I guess 50 character should suffice though. ¯\_(ツ)_/¯
1 parent cd1bcb6 commit 36f5b5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/SalesSequence/etc/db_schema.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<column xsi:type="varchar" name="entity_type" nullable="false" length="32" comment="Prefix"/>
4242
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
4343
comment="Store Id"/>
44-
<column xsi:type="varchar" name="sequence_table" nullable="false" length="32" comment="table for sequence"/>
44+
<column xsi:type="varchar" name="sequence_table" nullable="false" length="64" comment="table for sequence"/>
4545
<constraint xsi:type="primary" referenceId="PRIMARY">
4646
<column name="meta_id"/>
4747
</constraint>

0 commit comments

Comments
 (0)