migrations/Version20211118162732.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  *
  9.  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  10.  */
  11. final class Version20211118162732 extends AbstractMigration
  12. {
  13.     public function getDescription(): string
  14.     {
  15.         return '';
  16.     }
  17.     public function up(Schema $schema): void
  18.     {
  19.         // this up() migration is auto-generated, please modify it to your needs
  20.         $this->addSql('ALTER TABLE eckinox_users ADD client_id INT DEFAULT NULL');
  21.         $this->addSql('ALTER TABLE eckinox_users ADD CONSTRAINT FK_70F7314A19EB6921 FOREIGN KEY (client_id) REFERENCES `mallette_client` (id)');
  22.         $this->addSql('CREATE INDEX IDX_70F7314A19EB6921 ON eckinox_users (client_id)');
  23.     }
  24.     public function down(Schema $schema): void
  25.     {
  26.         // this down() migration is auto-generated, please modify it to your needs
  27.         $this->addSql('ALTER TABLE eckinox_users DROP FOREIGN KEY FK_70F7314A19EB6921');
  28.         $this->addSql('DROP INDEX IDX_70F7314A19EB6921 ON eckinox_users');
  29.         $this->addSql('ALTER TABLE eckinox_users DROP client_id');
  30.     }
  31.     public function isTransactional(): bool
  32.     {
  33.         return false;
  34.     }
  35. }