vendor/bluue/prestashop-connector-bundle/migrations/Version20240702144855.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace PrestashopConnectorBundleMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. final class Version20240702144855 extends AbstractMigration
  7. {
  8.     public function up(Schema $schema): void
  9.     {
  10.         $this->addSql('CREATE TABLE prestashop_connector_bundle__customer_import_rule (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', customer_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', country_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', content VARCHAR(256) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_7318AE6D9395C3F3 (customer_id), INDEX IDX_7318AE6DF92F3E70 (country_id), INDEX IDX_7318AE6DB03A8386 (created_by_id), INDEX IDX_7318AE6D896DBBDE (updated_by_id), INDEX IDX_7318AE6DC76F1F52 (deleted_by_id), INDEX deleted_at (deleted_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  11.         $this->addSql('ALTER TABLE prestashop_connector_bundle__customer_import_rule ADD CONSTRAINT FK_7318AE6D9395C3F3 FOREIGN KEY (customer_id) REFERENCES customers_bundle__customer (id)');
  12.         $this->addSql('ALTER TABLE prestashop_connector_bundle__customer_import_rule ADD CONSTRAINT FK_7318AE6DF92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
  13.         $this->addSql('ALTER TABLE prestashop_connector_bundle__customer_import_rule ADD CONSTRAINT FK_7318AE6DB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
  14.         $this->addSql('ALTER TABLE prestashop_connector_bundle__customer_import_rule ADD CONSTRAINT FK_7318AE6D896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
  15.         $this->addSql('ALTER TABLE prestashop_connector_bundle__customer_import_rule ADD CONSTRAINT FK_7318AE6DC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
  16.     }
  17.     public function down(Schema $schema): void
  18.     {
  19.         $this->addSql('ALTER TABLE prestashop_connector_bundle__customer_import_rule DROP FOREIGN KEY FK_7318AE6D9395C3F3');
  20.         $this->addSql('ALTER TABLE prestashop_connector_bundle__customer_import_rule DROP FOREIGN KEY FK_7318AE6DF92F3E70');
  21.         $this->addSql('ALTER TABLE prestashop_connector_bundle__customer_import_rule DROP FOREIGN KEY FK_7318AE6DB03A8386');
  22.         $this->addSql('ALTER TABLE prestashop_connector_bundle__customer_import_rule DROP FOREIGN KEY FK_7318AE6D896DBBDE');
  23.         $this->addSql('ALTER TABLE prestashop_connector_bundle__customer_import_rule DROP FOREIGN KEY FK_7318AE6DC76F1F52');
  24.         $this->addSql('DROP TABLE prestashop_connector_bundle__customer_import_rule');
  25.     }
  26. }