Skip to content

Commit

Permalink
Always initialize database storage when loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
elidrissidev committed Oct 6, 2022
1 parent 1b6c8a6 commit 79cbbc5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/code/core/Mage/Core/Model/File/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ public function getStorageModel($storage = null, $params = [])
case self::STORAGE_MEDIA_DATABASE:
$connection = $params['connection'] ?? null;
$model = Mage::getModel('core/file_storage_database', ['connection' => $connection]);
// Always initialize database storage to ensure the table exists
// see: https://github.com/OpenMage/magento-lts/pull/2627
$params['init'] = true;
break;
default:
return false;
Expand Down

0 comments on commit 79cbbc5

Please sign in to comment.