Skip to content

Commit ee66dbc

Browse files
committed
MC-5620: --convert-old-scripts mode does not convert indexes and constraints correctly
1 parent 8667f37 commit ee66dbc

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public function testCreateTable() : void
127127
'default' => 'CURRENT_TIMESTAMP',
128128
'disabled' => false,
129129
'onCreate' => null,
130+
'comment' => 'Column with type timestamp init update',
130131
],
131132
'integer' =>
132133
[
@@ -139,6 +140,7 @@ public function testCreateTable() : void
139140
'default' => null,
140141
'disabled' => false,
141142
'onCreate' => null,
143+
'comment' => 'Integer'
142144
],
143145
'decimal' =>
144146
[
@@ -151,6 +153,7 @@ public function testCreateTable() : void
151153
'default' => null,
152154
'disabled' => false,
153155
'onCreate' => null,
156+
'comment' => 'Decimal'
154157
],
155158
],
156159
$tables['First_Module']['new_table']['columns']

lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,13 @@ public function schemaListenerTablesDataProvider() : array
152152
<column xmlns:xsi="xsi" xsi:type="integer" name="first_column" nullable="1"
153153
unsigned="0"/>
154154
<column xmlns:xsi="xsi" xsi:type="date" name="second_column" nullable="0"/>
155-
<constraint xmlns:xsi="xsi" xsi:type="foreign" name="some_foreign_constraint"
155+
<constraint xmlns:xsi="xsi" xsi:type="foreign" referenceId="some_foreign_constraint"
156156
referenceTable="table" referenceColumn="column"
157157
table="first_table" column="first_column"/>
158-
<constraint xmlns:xsi="xsi" xsi:type="primary" name="PRIMARY">
158+
<constraint xmlns:xsi="xsi" xsi:type="primary" referenceId="PRIMARY">
159159
<column name="second_column"/>
160160
</constraint>
161-
<index name="TEST_INDEX" indexType="btree">
161+
<index referenceId="TEST_INDEX" indexType="btree">
162162
<column name="first_column"/>
163163
</index>
164164
</table>

0 commit comments

Comments
 (0)