Skip to content

Commit 89343cb

Browse files
Remove no longer necessary uploaded files structure migration (#4711)
2 parents 15295ef + d862d19 commit 89343cb

7 files changed

Lines changed: 20 additions & 308 deletions

File tree

build.xml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147

148148
<target name="build-deploy-part-1-db-independent" depends="build-version-generate,clean,composer-prod,dirs-create,assets,npm" description="First part of application build for production preserving your DB (can be run without maintenance page)."/>
149149

150-
<target name="build-deploy-part-2-db-dependent" depends="check-migrate-uploaded-files,elasticsearch-index-migrate,redis-check,db-migrations,domains-data-create,friendly-urls-generate,domains-urls-replace,migrate-uploaded-files-force,warmup" description="Second part of application build for production preserving your DB (must be run with maintenance page when containing DB migrations)."/>
150+
<target name="build-deploy-part-2-db-dependent" depends="elasticsearch-index-migrate,redis-check,db-migrations,domains-data-create,friendly-urls-generate,domains-urls-replace,warmup" description="Second part of application build for production preserving your DB (must be run with maintenance page when containing DB migrations)."/>
151151

152152
<target name="build-deploy-part-3-non-blocking" depends="run-post-deploy-tasks" description="Third part of application build for production. Non-blocking tasks that run after maintenance page is turned off."/>
153153

@@ -173,13 +173,6 @@
173173
</copy>
174174
</target>
175175

176-
<target name="check-migrate-uploaded-files" description="Checks if the uploaded files structure is compatible with 'migrate-uploaded-files'." hidden="true">
177-
<exec executable="${path.php.executable}" passthru="true" checkreturn="true">
178-
<arg value="${path.bin-console}"/>
179-
<arg value="shopsys:uploaded-files:check-migrate"/>
180-
</exec>
181-
</target>
182-
183176
<target name="checks" depends="checks-internal,standards,tests" description="Runs internal checks, coding standards and runs unit, DB and smoke tests."/>
184177

185178
<target name="checks-ci" depends="checks-internal,test-demo-data,tests-functional,tests-smoke,tests-acceptance" description="Runs internal checks and runs DB, smoke and acceptance tests."/>
@@ -847,21 +840,6 @@
847840
</exec>
848841
</target>
849842

850-
<target name="migrate-uploaded-files" description="Move all uploaded files from subdirectories to the top level directory." hidden="true">
851-
<exec executable="${path.php.executable}" passthru="true" checkreturn="true">
852-
<arg value="${path.bin-console}"/>
853-
<arg value="shopsys:uploaded-files:migrate"/>
854-
</exec>
855-
</target>
856-
857-
<target name="migrate-uploaded-files-force" description="Force move (without check) all uploaded files from subdirectories to the top level directory." hidden="true">
858-
<exec executable="${path.php.executable}" passthru="true" checkreturn="true">
859-
<arg value="${path.bin-console}"/>
860-
<arg value="shopsys:uploaded-files:migrate"/>
861-
<arg value="--force"/>
862-
</exec>
863-
</target>
864-
865843
<target name="npm" description="Build node modules.">
866844
<phingcall target="npm-install-dependencies"/>
867845
<phingcall target="npm-export-translations"/>

src/Command/CheckMigrateUploadedFilesCommand.php

Lines changed: 0 additions & 114 deletions
This file was deleted.

src/Command/MigrateUploadedFilesCommand.php

Lines changed: 0 additions & 140 deletions
This file was deleted.

src/Component/Setting/Setting.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class Setting
2727
public const string TRANSFER_DAYS_BETWEEN_STOCKS = 'transferDaysBetweenStocks';
2828
public const string FEED_DELIVERY_DAYS_FOR_OUT_OF_STOCK_PRODUCTS = 'feedDeliveryDaysForOutOfStockProducts';
2929
public const string CUSTOMER_USER_DEFAULT_GROUP_ROLE_ID = 'customerUserDefaultGroupRoleId';
30-
public const string FILE_STRUCTURE_MIGRATED_FOR_RELATIONS = 'fileStructureMigratedForRelations';
3130
public const string CSP_HEADER = 'cspHeader';
3231

3332
/**

src/Migrations/Version20240730113802.php

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Shopsys\FrameworkBundle\Migrations;
6+
7+
use Doctrine\DBAL\Schema\Schema;
8+
use Override;
9+
use Shopsys\MigrationBundle\Component\Doctrine\Migrations\AbstractMigration;
10+
11+
final class Version20260720150326 extends AbstractMigration
12+
{
13+
#[Override]
14+
public function up(Schema $schema): void
15+
{
16+
$this->sql('DELETE FROM setting_values WHERE name = \'fileStructureMigratedForRelations\'');
17+
$this->sql('DELETE FROM migrations WHERE version = \'Shopsys\FrameworkBundle\Migrations\Version20240730113802\'');
18+
}
19+
}

src/Resources/config/services/commands.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ services:
77
Shopsys\FrameworkBundle\Command\:
88
resource: '../../Command'
99

10-
Shopsys\FrameworkBundle\Command\CheckMigrateUploadedFilesCommand:
11-
arguments:
12-
- '%shopsys.uploaded_file_dir%'
13-
1410
Shopsys\FrameworkBundle\Command\ConfigureDomainsUrlsCommand:
1511
arguments:
1612
$configFilepath: '%shopsys.domain_urls_config_filepath%'
@@ -26,10 +22,6 @@ services:
2622
Shopsys\FrameworkBundle\Command\ExtendedClassesAnnotationsCommand:
2723
autoconfigure: false
2824

29-
Shopsys\FrameworkBundle\Command\MigrateUploadedFilesCommand:
30-
arguments:
31-
- '%shopsys.uploaded_file_dir%'
32-
3325
# the command is supposed to be used in DEV environment only so it is configured in services_dev.yaml
3426
Shopsys\FrameworkBundle\Command\ReplaceObsoleteIconsCommand:
3527
autoconfigure: false

0 commit comments

Comments
 (0)