Skip to content

Commit

Permalink
cleanup DB schema
Browse files Browse the repository at this point in the history
- remove outdated indexes and constraints
- as suggested by doctrine:schema:update console command
  • Loading branch information
vitek-rostislav committed Jun 14, 2024
1 parent be933ba commit 590282c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/Migrations/Version20240613231000.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

declare(strict_types=1);

namespace Shopsys\FrameworkBundle\Migrations;

use Doctrine\DBAL\Schema\Schema;
use Shopsys\MigrationBundle\Component\Doctrine\Migrations\AbstractMigration;

class Version20240613231000 extends AbstractMigration
{
/**
* @param \Doctrine\DBAL\Schema\Schema $schema
*/
public function up(Schema $schema): void
{
$this->sql('DROP INDEX idx_bf6e22b08b8e8428');
$this->sql('ALTER TABLE navigation_item_categories DROP CONSTRAINT fk_b2a413d84f43d067');
$this->sql('ALTER TABLE navigation_item_categories DROP CONSTRAINT fk_b2a413d812469de2');
$this->sql('ALTER TABLE parameter_translations DROP CONSTRAINT fk_16f42d262c2ac5d3');
$this->sql('ALTER TABLE unit_translations DROP CONSTRAINT fk_15c4c1de2c2ac5d3');
$this->sql('ALTER TABLE flag_translations DROP CONSTRAINT fk_23d1ba1a2c2ac5d3');
$this->sql('ALTER TABLE cart_promo_codes DROP CONSTRAINT fk_5de6e36c1ad5cdbf');
$this->sql('ALTER TABLE cart_promo_codes DROP CONSTRAINT fk_5de6e36c2fae4625');
$this->sql('ALTER TABLE delivery_addresses DROP CONSTRAINT fk_2baf3984e76aa954');
}

/**
* @param \Doctrine\DBAL\Schema\Schema $schema
*/
public function down(Schema $schema): void
{
}
}

0 comments on commit 590282c

Please sign in to comment.