Skip to content

Commit 03628ba

Browse files
committed
Rollback support for m250623_105031_entry_type_descriptions
1 parent 2461264 commit 03628ba

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/migrations/m250623_105031_entry_type_descriptions.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ public function safeUp(): bool
2525
*/
2626
public function safeDown(): bool
2727
{
28-
echo "m250623_105031_entry_type_descriptions cannot be reverted.\n";
29-
return false;
28+
if ($this->db->columnExists(Table::ENTRYTYPES, 'description')) {
29+
$this->dropColumn(Table::ENTRYTYPES, 'description');
30+
}
31+
if ($this->db->columnExists(Table::SECTIONS_ENTRYTYPES, 'description')) {
32+
$this->dropColumn(Table::SECTIONS_ENTRYTYPES, 'description');
33+
}
34+
return true;
3035
}
3136
}

0 commit comments

Comments
 (0)