From 1b61609a31a044e5cef691ec668af434b0ce0085 Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Tue, 22 Jul 2025 14:10:11 +0000 Subject: [PATCH] Update 20250626144501_modify_borrow_reason_in_asset_management_journal.php --- ...44501_modify_borrow_reason_in_asset_management_journal.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/migrations/20250626144501_modify_borrow_reason_in_asset_management_journal.php b/db/migrations/20250626144501_modify_borrow_reason_in_asset_management_journal.php index 306b2dd10..c1e1685f3 100644 --- a/db/migrations/20250626144501_modify_borrow_reason_in_asset_management_journal.php +++ b/db/migrations/20250626144501_modify_borrow_reason_in_asset_management_journal.php @@ -10,6 +10,7 @@ final class ModifyBorrowReasonInAssetManagementJournal extends AbstractMigration */ public function up(): void { + if($this->getEnvironment() == "thetool") { $table = $this->table('AssetManagementJournal'); $table->changeColumn('borrowReason', 'text', [ 'null' => true, @@ -17,6 +18,7 @@ final class ModifyBorrowReasonInAssetManagementJournal extends AbstractMigration 'after' => 'returnDate', ]); $table->update(); + } } /** @@ -24,6 +26,7 @@ final class ModifyBorrowReasonInAssetManagementJournal extends AbstractMigration */ public function down(): void { + if($this->getEnvironment() == "thetool") { // Reverting the changes made in the up() method. // This assumes the column was NOT NULL and had no comment previously. $table = $this->table('AssetManagementJournal'); @@ -32,5 +35,6 @@ final class ModifyBorrowReasonInAssetManagementJournal extends AbstractMigration 'comment' => 'Reason for borrowing the asset', // Set comment back to empty ]); $table->update(); + } } }