migrations/Version20220819161256.php line 1

Open in your IDE?
  1. <?php
    
    declare(strict_types=1);
    
    namespace DoctrineMigrations;
    
    use Doctrine\DBAL\Schema\Schema;
    use Doctrine\Migrations\AbstractMigration;
    
    /**
     * Auto-generated Migration: Please modify to your needs!
     */
    final class Version20220819161256 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 client ADD date_created DATETIME NOT NULL, ADD date_modified DATETIME NOT NULL, ADD address_1 VARCHAR(255) DEFAULT NULL, ADD address_2 LONGTEXT DEFAULT NULL, ADD city LONGTEXT DEFAULT NULL, ADD zip LONGTEXT DEFAULT NULL, ADD country LONGTEXT DEFAULT NULL, ADD phone LONGTEXT DEFAULT NULL, ADD mobile LONGTEXT DEFAULT NULL, ADD web LONGTEXT DEFAULT NULL, ADD vat_id LONGTEXT DEFAULT NULL, ADD tax_code LONGTEXT DEFAULT NULL, ADD active INT NOT NULL');
            $this->addSql('DROP INDEX uniq_8d93d649e7927c74 ON client');
            $this->addSql('CREATE UNIQUE INDEX UNIQ_C7440455E7927C74 ON client (email)');
        }
    
        public function down(Schema $schema): void
        {
            // this down() migration is auto-generated, please modify it to your needs
            $this->addSql('ALTER TABLE client DROP date_created, DROP date_modified, DROP address_1, DROP address_2, DROP city, DROP zip, DROP country, DROP phone, DROP mobile, DROP web, DROP vat_id, DROP tax_code, DROP active');
            $this->addSql('DROP INDEX uniq_c7440455e7927c74 ON client');
            $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649E7927C74 ON client (email)');
        }
    }