From 9efe8e6853af092e43fc27babeec7f6f1fb1cffa Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 1 Jan 2023 03:42:18 +0000 Subject: [PATCH] Removed support for rolling back database migrations. --- .../2019_05_01_200400_initial_structure.php | 31 -------- ..._05_05_163101_add_forum_category_icons.php | 7 -- ...05_07_090631_create_feature_forum_type.php | 6 -- ...19_07_04_175010_create_emoticons_table.php | 6 -- .../2019_08_14_194510_create_config_table.php | 4 - ...0_01_181738_profile_fields_in_database.php | 36 --------- ...2019_12_08_181735_emoticon_restructure.php | 11 --- ...9_12_14_005624_added_chat_tokens_table.php | 4 - ...020_05_21_145756_audit_log_table_fixes.php | 9 --- ...5_25_133726_login_attempts_table_fixes.php | 9 --- ...2020_05_25_152331_sessions_table_fixes.php | 9 --- .../2020_05_27_134934_add_missing_indexes.php | 31 -------- ...2020_05_29_142907_recovery_table_fixes.php | 12 --- ...9_190810_case_insensitive_forum_search.php | 12 --- ..._05_30_142750_add_owner_id_to_comments.php | 9 --- ...2021_08_28_220000_nuke_relations_table.php | 25 ------- ...22_01_13_005600_nuke_chat_tokens_table.php | 18 ----- src/Console/Commands/MigrateCommand.php | 23 +++--- src/Console/Commands/NewMigrationCommand.php | 6 -- src/Database/DatabaseMigrationManager.php | 73 ------------------- 20 files changed, 12 insertions(+), 329 deletions(-) diff --git a/database/2019_05_01_200400_initial_structure.php b/database/2019_05_01_200400_initial_structure.php index bfc9068..62bf8d1 100644 --- a/database/2019_05_01_200400_initial_structure.php +++ b/database/2019_05_01_200400_initial_structure.php @@ -671,34 +671,3 @@ function migrate_up(PDO $conn): void { ) COLLATE='utf8mb4_bin' ENGINE=InnoDB; "); } - -function migrate_down(PDO $conn): void { - $conn->exec("DROP TABLE `msz_forum_posts`"); - $conn->exec("DROP TABLE `msz_forum_topics_track`"); - $conn->exec("DROP TABLE `msz_forum_topics`"); - $conn->exec("DROP TABLE `msz_forum_permissions`"); - $conn->exec("DROP TABLE `msz_forum_categories`"); - $conn->exec("DROP TABLE `msz_forum_polls_answers`"); - $conn->exec("DROP TABLE `msz_forum_polls_options`"); - $conn->exec("DROP TABLE `msz_forum_polls`"); - $conn->exec("DROP TABLE `msz_changelog_change_tags`"); - $conn->exec("DROP TABLE `msz_changelog_changes`"); - $conn->exec("DROP TABLE `msz_changelog_tags`"); - $conn->exec("DROP TABLE `msz_news_posts`"); - $conn->exec("DROP TABLE `msz_news_categories`"); - $conn->exec("DROP TABLE `msz_comments_votes`"); - $conn->exec("DROP TABLE `msz_comments_posts`"); - $conn->exec("DROP TABLE `msz_comments_categories`"); - $conn->exec("DROP TABLE `msz_login_attempts`"); - $conn->exec("DROP TABLE `msz_auth_tfa`"); - $conn->exec("DROP TABLE `msz_audit_log`"); - $conn->exec("DROP TABLE `msz_permissions`"); - $conn->exec("DROP TABLE `msz_sessions`"); - $conn->exec("DROP TABLE `msz_user_warnings`"); - $conn->exec("DROP TABLE `msz_user_relations`"); - $conn->exec("DROP TABLE `msz_users_password_resets`"); - $conn->exec("DROP TABLE `msz_user_roles`"); - $conn->exec("DROP TABLE `msz_users`"); - $conn->exec("DROP TABLE `msz_roles`"); - $conn->exec("DROP TABLE `msz_ip_blacklist`"); -} diff --git a/database/2019_05_05_163101_add_forum_category_icons.php b/database/2019_05_05_163101_add_forum_category_icons.php index 168f207..213c7b1 100644 --- a/database/2019_05_05_163101_add_forum_category_icons.php +++ b/database/2019_05_05_163101_add_forum_category_icons.php @@ -9,10 +9,3 @@ function migrate_up(PDO $conn): void { ADD COLUMN `forum_icon` VARCHAR(50) NULL DEFAULT NULL AFTER `forum_description`; "); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - ALTER TABLE `msz_forum_categories` - DROP COLUMN `forum_icon`; - "); -} diff --git a/database/2019_05_07_090631_create_feature_forum_type.php b/database/2019_05_07_090631_create_feature_forum_type.php index f841734..3e714eb 100644 --- a/database/2019_05_07_090631_create_feature_forum_type.php +++ b/database/2019_05_07_090631_create_feature_forum_type.php @@ -25,9 +25,3 @@ function migrate_up(PDO $conn): void { ) COLLATE='utf8mb4_bin' ENGINE=InnoDB; "); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - DROP TABLE `msz_forum_topics_priority` - "); -} diff --git a/database/2019_07_04_175010_create_emoticons_table.php b/database/2019_07_04_175010_create_emoticons_table.php index 262edde..3e564de 100644 --- a/database/2019_07_04_175010_create_emoticons_table.php +++ b/database/2019_07_04_175010_create_emoticons_table.php @@ -19,9 +19,3 @@ function migrate_up(PDO $conn): void { ) COLLATE='utf8mb4_bin' ENGINE=InnoDB; "); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - DROP TABLE `msz_emoticons`; - "); -} diff --git a/database/2019_08_14_194510_create_config_table.php b/database/2019_08_14_194510_create_config_table.php index 5f0d0b9..e683eb1 100644 --- a/database/2019_08_14_194510_create_config_table.php +++ b/database/2019_08_14_194510_create_config_table.php @@ -12,7 +12,3 @@ function migrate_up(PDO $conn): void { ) COLLATE='utf8mb4_bin' ENGINE=InnoDB; "); } - -function migrate_down(PDO $conn): void { - $conn->exec("DROP TABLE `msz_config`;"); -} diff --git a/database/2019_10_01_181738_profile_fields_in_database.php b/database/2019_10_01_181738_profile_fields_in_database.php index 78e3fe4..bb13072 100644 --- a/database/2019_10_01_181738_profile_fields_in_database.php +++ b/database/2019_10_01_181738_profile_fields_in_database.php @@ -159,39 +159,3 @@ function migrate_up(PDO $conn): void { DROP COLUMN `user_lastfm`; "); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - ALTER TABLE `msz_users` - ADD COLUMN `user_website` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin' AFTER `user_background_settings`, - ADD COLUMN `user_twitter` VARCHAR(20) NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin' AFTER `user_website`, - ADD COLUMN `user_github` VARCHAR(40) NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin' AFTER `user_twitter`, - ADD COLUMN `user_skype` VARCHAR(60) NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin' AFTER `user_github`, - ADD COLUMN `user_discord` VARCHAR(40) NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin' AFTER `user_skype`, - ADD COLUMN `user_youtube` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin' AFTER `user_discord`, - ADD COLUMN `user_steam` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin' AFTER `user_youtube`, - ADD COLUMN `user_ninswitch` VARCHAR(14) NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin' AFTER `user_steam`, - ADD COLUMN `user_twitchtv` VARCHAR(30) NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin' AFTER `user_ninswitch`, - ADD COLUMN `user_osu` VARCHAR(20) NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin' AFTER `user_twitchtv`, - ADD COLUMN `user_lastfm` VARCHAR(20) NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin' AFTER `user_osu`; - "); - - $existingFields = $conn->query(" - SELECT pfv.`user_id`, pf.`field_key`, pfv.`field_value` - FROM `msz_profile_fields_values` AS pfv - LEFT JOIN `msz_profile_fields` AS pf - ON pf.`field_id` = pfv.`field_id` - "); - - $updatePreps = []; - foreach($existingFields as $field) { - ($updatePreps[$field['field_key']] ?? ($updatePreps[$field['field_key']] = $conn->prepare("UPDATE `msz_users` SET `user_{$field['field_key']}` = :value WHERE `user_id` = :user_id")))->execute([ - 'value' => $field['field_value'], - 'user_id' => $field['user_id'], - ]); - } - - $conn->exec("DROP TABLE `msz_profile_fields_values`"); - $conn->exec("DROP TABLE `msz_profile_fields_formats`"); - $conn->exec("DROP TABLE `msz_profile_fields`"); -} diff --git a/database/2019_12_08_181735_emoticon_restructure.php b/database/2019_12_08_181735_emoticon_restructure.php index f95f211..5be5210 100644 --- a/database/2019_12_08_181735_emoticon_restructure.php +++ b/database/2019_12_08_181735_emoticon_restructure.php @@ -73,14 +73,3 @@ function migrate_up(PDO $conn): void { } } } - -function migrate_down(PDO $conn): void { - $conn->exec('DROP TABLE `msz_emoticons_strings`'); - $conn->exec(" - ALTER TABLE `msz_emoticons` - ADD COLUMN `emote_string` VARCHAR(50) NOT NULL COLLATE 'ascii_general_nopad_ci' AFTER `emote_hierarchy`, - DROP INDEX `emotes_url`, - ADD INDEX `emotes_url` (`emote_url`), - ADD UNIQUE INDEX `emote_string` (`emote_url`); - "); -} diff --git a/database/2019_12_14_005624_added_chat_tokens_table.php b/database/2019_12_14_005624_added_chat_tokens_table.php index 0161253..769da3b 100644 --- a/database/2019_12_14_005624_added_chat_tokens_table.php +++ b/database/2019_12_14_005624_added_chat_tokens_table.php @@ -20,7 +20,3 @@ function migrate_up(PDO $conn): void { ) COLLATE='utf8mb4_bin' ENGINE=InnoDB; "); } - -function migrate_down(PDO $conn): void { - $conn->exec("DROP TABLE `msz_user_chat_tokens`"); -} diff --git a/database/2020_05_21_145756_audit_log_table_fixes.php b/database/2020_05_21_145756_audit_log_table_fixes.php index 7dbf4b3..580fdc0 100644 --- a/database/2020_05_21_145756_audit_log_table_fixes.php +++ b/database/2020_05_21_145756_audit_log_table_fixes.php @@ -10,12 +10,3 @@ function migrate_up(PDO $conn): void { ADD INDEX `audit_log_created_index` (`log_created`); '); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - ALTER TABLE `msz_audit_log` - ADD COLUMN `log_id` INT UNSIGNED NOT NULL AUTO_INCREMENT FIRST, - DROP INDEX `audit_log_created_index`, - ADD PRIMARY KEY (`log_id`); - "); -} diff --git a/database/2020_05_25_133726_login_attempts_table_fixes.php b/database/2020_05_25_133726_login_attempts_table_fixes.php index 5ea464b..6a587e3 100644 --- a/database/2020_05_25_133726_login_attempts_table_fixes.php +++ b/database/2020_05_25_133726_login_attempts_table_fixes.php @@ -10,12 +10,3 @@ function migrate_up(PDO $conn): void { ADD INDEX `login_attempts_created_index` (`attempt_created`); "); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - ALTER TABLE `msz_login_attempts` - ADD COLUMN `attempt_id` INT UNSIGNED NOT NULL AUTO_INCREMENT FIRST, - DROP INDEX `login_attempts_created_index`, - ADD PRIMARY KEY (`attempt_id`); - "); -} diff --git a/database/2020_05_25_152331_sessions_table_fixes.php b/database/2020_05_25_152331_sessions_table_fixes.php index 9820beb..7b6b4c3 100644 --- a/database/2020_05_25_152331_sessions_table_fixes.php +++ b/database/2020_05_25_152331_sessions_table_fixes.php @@ -11,12 +11,3 @@ function migrate_up(PDO $conn): void { ADD INDEX `sessions_created_index` (`session_created`); "); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - ALTER TABLE `msz_sessions` - CHANGE COLUMN `session_key` `session_key` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_bin' AFTER `user_id`, - CHANGE COLUMN `session_expires` `session_expires` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP() ON UPDATE CURRENT_TIMESTAMP() AFTER `session_country`, - DROP INDEX `sessions_created_index`; - "); -} diff --git a/database/2020_05_27_134934_add_missing_indexes.php b/database/2020_05_27_134934_add_missing_indexes.php index 0f1a04b..e6d0285 100644 --- a/database/2020_05_27_134934_add_missing_indexes.php +++ b/database/2020_05_27_134934_add_missing_indexes.php @@ -33,34 +33,3 @@ function migrate_up(PDO $conn): void { ADD INDEX `user_relations_created_index` (`relation_created`); "); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - ALTER TABLE `msz_forum_categories` - DROP INDEX `forum_link_clicks_index`, - DROP INDEX `forum_hidden_index`; - "); - - $conn->exec(" - ALTER TABLE `msz_login_attempts` - DROP INDEX `login_attempts_success_index`, - DROP INDEX `login_attempts_ip_index`; - "); - - $conn->exec(" - ALTER TABLE `msz_news_categories` - DROP INDEX `news_categories_is_hidden_index`; - "); - - $conn->exec(" - ALTER TABLE `msz_roles` - DROP INDEX `roles_hierarchy_index`, - DROP INDEX `roles_hidden_index`; - "); - - $conn->exec(" - ALTER TABLE `msz_user_relations` - DROP INDEX `user_relations_type_index`, - DROP INDEX `user_relations_created_index`; - "); -} diff --git a/database/2020_05_29_142907_recovery_table_fixes.php b/database/2020_05_29_142907_recovery_table_fixes.php index 1f5b0d4..b54b673 100644 --- a/database/2020_05_29_142907_recovery_table_fixes.php +++ b/database/2020_05_29_142907_recovery_table_fixes.php @@ -14,15 +14,3 @@ function migrate_up(PDO $conn): void { ADD UNIQUE INDEX `users_password_resets_token_unique` (`verification_code`); "); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - ALTER TABLE `msz_users_password_resets` - CHANGE COLUMN `verification_code` `verification_code` CHAR(12) NULL DEFAULT NULL COLLATE 'utf8mb4_bin' AFTER `reset_requested`, - DROP INDEX `users_password_resets_user_unique`, - ADD UNIQUE INDEX `msz_users_password_resets_unique` (`user_id`, `reset_ip`), - DROP INDEX `users_password_resets_created_index`, - ADD INDEX `msz_users_password_resets_index` (`reset_requested`), - DROP INDEX `users_password_resets_token_unique`; - "); -} diff --git a/database/2020_05_29_190810_case_insensitive_forum_search.php b/database/2020_05_29_190810_case_insensitive_forum_search.php index 2cdca7a..0a11780 100644 --- a/database/2020_05_29_190810_case_insensitive_forum_search.php +++ b/database/2020_05_29_190810_case_insensitive_forum_search.php @@ -14,15 +14,3 @@ function migrate_up(PDO $conn): void { CHANGE COLUMN `post_text` `post_text` TEXT(65535) NOT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `post_ip`; "); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - ALTER TABLE `msz_forum_topics` - CHANGE COLUMN `topic_title` `topic_title` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_bin' AFTER `topic_type`; - "); - - $conn->exec(" - ALTER TABLE `msz_forum_posts` - CHANGE COLUMN `post_text` `post_text` TEXT(65535) NOT NULL COLLATE 'utf8mb4_bin' AFTER `post_ip`; - "); -} diff --git a/database/2020_05_30_142750_add_owner_id_to_comments.php b/database/2020_05_30_142750_add_owner_id_to_comments.php index 9130509..396f3fa 100644 --- a/database/2020_05_30_142750_add_owner_id_to_comments.php +++ b/database/2020_05_30_142750_add_owner_id_to_comments.php @@ -15,12 +15,3 @@ function migrate_up(PDO $conn): void { ON DELETE SET NULL; "); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - ALTER TABLE `msz_comments_categories` - DROP COLUMN `owner_id`, - DROP INDEX `comments_categories_owner_foreign`, - DROP FOREIGN KEY `comments_categories_owner_foreign`; - "); -} diff --git a/database/2021_08_28_220000_nuke_relations_table.php b/database/2021_08_28_220000_nuke_relations_table.php index 3311f82..3122b85 100644 --- a/database/2021_08_28_220000_nuke_relations_table.php +++ b/database/2021_08_28_220000_nuke_relations_table.php @@ -6,28 +6,3 @@ use PDO; function migrate_up(PDO $conn): void { $conn->exec("DROP TABLE `msz_user_relations`"); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - CREATE TABLE `msz_user_relations` ( - `user_id` INT(10) UNSIGNED NOT NULL, - `subject_id` INT(10) UNSIGNED NOT NULL, - `relation_type` TINYINT(3) UNSIGNED NOT NULL, - `relation_created` TIMESTAMP NOT NULL DEFAULT current_timestamp(), - UNIQUE INDEX `user_relations_unique` (`user_id`, `subject_id`) USING BTREE, - INDEX `user_relations_subject_id_foreign` (`subject_id`) USING BTREE, - INDEX `user_relations_type_index` (`relation_type`) USING BTREE, - INDEX `user_relations_created_index` (`relation_created`) USING BTREE, - CONSTRAINT `user_relations_subject_id_foreign` - FOREIGN KEY (`subject_id`) - REFERENCES `msz_users` (`user_id`) - ON UPDATE CASCADE - ON DELETE CASCADE, - CONSTRAINT `user_relations_user_id_foreign` - FOREIGN KEY (`user_id`) - REFERENCES `msz_users` (`user_id`) - ON UPDATE CASCADE - ON DELETE CASCADE - ) COLLATE='utf8mb4_bin' ENGINE=InnoDB; - "); -} diff --git a/database/2022_01_13_005600_nuke_chat_tokens_table.php b/database/2022_01_13_005600_nuke_chat_tokens_table.php index ccc9a04..ce47569 100644 --- a/database/2022_01_13_005600_nuke_chat_tokens_table.php +++ b/database/2022_01_13_005600_nuke_chat_tokens_table.php @@ -6,21 +6,3 @@ use PDO; function migrate_up(PDO $conn): void { $conn->exec("DROP TABLE `msz_user_chat_tokens`"); } - -function migrate_down(PDO $conn): void { - $conn->exec(" - CREATE TABLE `msz_user_chat_tokens` ( - `user_id` INT(10) UNSIGNED NOT NULL, - `token_string` CHAR(64) NOT NULL, - `token_created` TIMESTAMP NOT NULL DEFAULT current_timestamp(), - UNIQUE INDEX `user_chat_token_string_unique` (`token_string`), - INDEX `user_chat_token_user_foreign` (`user_id`), - INDEX `user_chat_token_created_key` (`token_created`), - CONSTRAINT `user_chat_token_user_foreign` - FOREIGN KEY (`user_id`) - REFERENCES `msz_users` (`user_id`) - ON UPDATE CASCADE - ON DELETE CASCADE - ) COLLATE='utf8mb4_bin' ENGINE=InnoDB; - "); -} diff --git a/src/Console/Commands/MigrateCommand.php b/src/Console/Commands/MigrateCommand.php index 6a4dd45..a5a82d4 100644 --- a/src/Console/Commands/MigrateCommand.php +++ b/src/Console/Commands/MigrateCommand.php @@ -24,20 +24,21 @@ class MigrateCommand implements CommandInterface { echo $log . PHP_EOL; }); - if($args->getArg(0) === 'rollback') - $migrationManager->rollback(); - else + if($args->getArg(0) === 'rollback') { + echo 'Migration rollback is gone.' . PHP_EOL; + } else { $migrationManager->migrate(); - $errors = $migrationManager->getErrors(); - $errorCount = count($errors); + $errors = $migrationManager->getErrors(); + $errorCount = count($errors); - if($errorCount < 1) { - echo 'Completed with no errors!' . PHP_EOL; - } else { - echo PHP_EOL . "There were {$errorCount} errors during the migrations..." . PHP_EOL; - foreach($errors as $error) - echo $error . PHP_EOL; + if($errorCount < 1) { + echo 'Completed with no errors!' . PHP_EOL; + } else { + echo PHP_EOL . "There were {$errorCount} errors during the migrations..." . PHP_EOL; + foreach($errors as $error) + echo $error . PHP_EOL; + } } unlink(MSZ_ROOT . '/.migrating'); diff --git a/src/Console/Commands/NewMigrationCommand.php b/src/Console/Commands/NewMigrationCommand.php index f9df272..7b655d8 100644 --- a/src/Console/Commands/NewMigrationCommand.php +++ b/src/Console/Commands/NewMigrationCommand.php @@ -17,12 +17,6 @@ function migrate_up(PDO \$conn): void { "); } -function migrate_down(PDO \$conn): void { - \$conn->exec(" - DROP TABLE ... - "); -} - MIG; public function getName(): string { diff --git a/src/Database/DatabaseMigrationManager.php b/src/Database/DatabaseMigrationManager.php index 17502d6..44d919d 100644 --- a/src/Database/DatabaseMigrationManager.php +++ b/src/Database/DatabaseMigrationManager.php @@ -152,77 +152,4 @@ final class DatabaseMigrationManager { return true; } - - public function rollback(): bool - { - $this->writeLog('Rolling back last migration batch...'); - - if(!$this->createMigrationRepository()) { - return false; - } - - try { - $fetchStatus = $this->targetConnection->prepare(" - SELECT *, CONCAT(:basepath, '/', `migration_name`, '.php') as `migration_path` - FROM `msz_migrations` - WHERE `migration_batch` = ( - SELECT MAX(`migration_batch`) - FROM `msz_migrations` - ) - "); - $fetchStatus->bindValue('basepath', $this->migrationStorage); - $migrations = $fetchStatus->execute() ? $fetchStatus->fetchAll() : []; - } catch(PDOException $ex) { - $this->addError($ex); - return false; - } - - if(count($migrations) < 1) { - if(count($this->errors) > 0) { - return false; - } - - $this->writeLog('Nothing to roll back!'); - return true; - } - - $migrationScripts = $this->getMigrationScripts(); - - if(count($migrationScripts) < count($migrations)) { - $this->addError(new Exception('There are missing migration scripts!')); - return false; - } - - $removeRecord = $this->targetConnection->prepare(' - DELETE FROM `msz_migrations` - WHERE `migration_id` = :id - '); - - foreach($migrations as $migration) { - if(!file_exists($migration['migration_path'])) { - $this->addError(new Exception("Migration '{$migration['migration_name']}' does not exist.")); - return false; - } - - $nameSplit = explode('_', $migration['migration_name']); - $migrationName = ''; - - for($i = 4; $i < count($nameSplit); $i++) { - $migrationName .= ucfirst(mb_strtolower($nameSplit[$i])); - } - - include_once $migration['migration_path']; - - $this->writeLog("Rolling '{$migration['migration_name']}' back..."); - $migrationFunction = sprintf(self::MIGRATION_NAMESPACE, $migrationName, 'migrate_down'); - $migrationFunction($this->targetConnection); - - $removeRecord->bindValue('id', $migration['migration_id']); - $removeRecord->execute(); - } - - $this->writeLog('Successfully completed all rollbacks'); - - return true; - } }