Skip to content

Commit 0fafbe5

Browse files
committed
fix: ensure table options are set to null if not defined in tree and multiple_tree migrations.
1 parent f7e9eae commit 0fafbe5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

migrations/m250707_103609_tree.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class m250707_103609_tree extends Migration
99
public function safeUp()
1010
{
1111
$rawPrimaryKey = 'NUMBER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY';
12-
$tableOptions = [];
1312

1413
if ($this->db->driverName === 'mysql') {
1514
$tableOptions = 'ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci';
@@ -24,7 +23,7 @@ public function safeUp()
2423
'rgt' => $this->integer()->notNull(),
2524
'depth' => $this->integer()->notNull(),
2625
],
27-
$tableOptions,
26+
$tableOptions ?? null,
2827
);
2928

3029
$this->createIndex('idx_tree_lft', '{{%tree}}', 'lft');

migrations/m250707_104009_multiple_tree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function safeUp()
2424
'rgt' => $this->integer()->notNull(),
2525
'depth' => $this->integer()->notNull(),
2626
],
27-
$tableOptions,
27+
$tableOptions ?? null,
2828
);
2929

3030
$this->createIndex('idx_multiple_tree_tree', '{{%multiple_tree}}', 'tree');

0 commit comments

Comments
 (0)