diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index afeeae8..078e379 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -5,18 +5,18 @@ on: pull_request: jobs: - + security: - + name: Security check (PHP ${{ matrix.php }}) - + runs-on: ubuntu-latest - + strategy: fail-fast: false matrix: - php: ['8.0', '8.1'] - + php: ['8.1'] + steps: - uses: actions/checkout@v3 diff --git a/Makefile b/Makefile index 254b87c..9ad4203 100644 --- a/Makefile +++ b/Makefile @@ -84,6 +84,8 @@ setup_application: ${APP_DIR}/docker-compose.yaml: rm -f ${APP_DIR}/docker-compose.yml rm -f ${APP_DIR}/docker-compose.yaml + rm -f ${APP_DIR}/compose.yml # Remove Sylius file about Docker + rm -f ${APP_DIR}/compose.override.dist.yml # Remove Sylius file about Docker ln -s ../../docker-compose.yaml.dist ${APP_DIR}/docker-compose.yaml .PHONY: ${APP_DIR}/docker-compose.yaml diff --git a/src/Migrations/Version20240730093001.php b/src/Migrations/Version20240730093001.php new file mode 100644 index 0000000..a4b4482 --- /dev/null +++ b/src/Migrations/Version20240730093001.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace MonsieurBiz\SyliusOrderHistoryPlugin\Migrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20240730093001 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE monsieurbiz_order_history_event DROP FOREIGN KEY FK_9EA44E026352511C'); + $this->addSql('ALTER TABLE monsieurbiz_order_history_event DROP FOREIGN KEY FK_9EA44E02A45D93BF'); + $this->addSql('ALTER TABLE monsieurbiz_order_history_event ADD CONSTRAINT FK_9EA44E026352511C FOREIGN KEY (admin_user_id) REFERENCES sylius_admin_user (id) ON DELETE SET NULL'); + $this->addSql('ALTER TABLE monsieurbiz_order_history_event ADD CONSTRAINT FK_9EA44E02A45D93BF FOREIGN KEY (shop_user_id) REFERENCES sylius_shop_user (id) ON DELETE CASCADE'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE monsieurbiz_order_history_event DROP FOREIGN KEY FK_9EA44E02A45D93BF'); + $this->addSql('ALTER TABLE monsieurbiz_order_history_event DROP FOREIGN KEY FK_9EA44E026352511C'); + $this->addSql('ALTER TABLE monsieurbiz_order_history_event ADD CONSTRAINT FK_9EA44E02A45D93BF FOREIGN KEY (shop_user_id) REFERENCES sylius_shop_user (id) ON UPDATE NO ACTION ON DELETE NO ACTION'); + $this->addSql('ALTER TABLE monsieurbiz_order_history_event ADD CONSTRAINT FK_9EA44E026352511C FOREIGN KEY (admin_user_id) REFERENCES sylius_admin_user (id) ON UPDATE NO ACTION ON DELETE NO ACTION'); + } +} diff --git a/src/Resources/config/doctrine/OrderHistoryEvent.orm.xml b/src/Resources/config/doctrine/OrderHistoryEvent.orm.xml index a137877..85bc6f1 100644 --- a/src/Resources/config/doctrine/OrderHistoryEvent.orm.xml +++ b/src/Resources/config/doctrine/OrderHistoryEvent.orm.xml @@ -32,11 +32,11 @@ - + - +