Covivo/mobicoop

View on GitHub
api/src/Migrations/Version20230113075719.php

Summary

Maintainability
A
2 hrs
Test Coverage
<?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 Version20230113075719 extends AbstractMigration
{
    public function up(Schema $schema) : void
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

        $this->addSql('ALTER TABLE mobconnect__long_distance_subscription CHANGE street_address street_address VARCHAR(255) DEFAULT NULL, CHANGE postal_code postal_code VARCHAR(15) DEFAULT NULL, CHANGE address_locality address_locality VARCHAR(100) DEFAULT NULL, CHANGE initial_commitment_proof initial_commitment_proof VARCHAR(255) DEFAULT NULL COMMENT \'The autogenerated initial commintment proof\', CHANGE honour_certificate honour_certificate VARCHAR(255) DEFAULT NULL COMMENT \'The autogenerated honour certificate\'');
        $this->addSql('ALTER TABLE mobconnect__short_distance_subscription CHANGE street_address street_address VARCHAR(255) DEFAULT NULL, CHANGE postal_code postal_code VARCHAR(15) DEFAULT NULL, CHANGE address_locality address_locality VARCHAR(100) DEFAULT NULL, CHANGE initial_commitment_proof initial_commitment_proof VARCHAR(255) DEFAULT NULL COMMENT \'The autogenerated initial commintment proof\', CHANGE honour_certificate honour_certificate VARCHAR(255) DEFAULT NULL COMMENT \'The autogenerated honour certificate\'');
    }

    public function down(Schema $schema) : void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

        $this->addSql('ALTER TABLE mobconnect__long_distance_subscription CHANGE street_address street_address VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE postal_code postal_code VARCHAR(15) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE address_locality address_locality VARCHAR(100) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE initial_commitment_proof initial_commitment_proof VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'The autogenerated initial commintment proof\', CHANGE honour_certificate honour_certificate VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'The autogenerated honour certificate\'');
        $this->addSql('ALTER TABLE mobconnect__short_distance_subscription CHANGE street_address street_address VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE postal_code postal_code VARCHAR(15) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE address_locality address_locality VARCHAR(100) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE initial_commitment_proof initial_commitment_proof VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'The autogenerated initial commintment proof\', CHANGE honour_certificate honour_certificate VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'The autogenerated honour certificate\'');
    }
}