api/src/Migrations/Version20221227150225.php
<?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 Version20221227150225 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 driving_license_number driving_licence_number VARCHAR(15) NOT NULL');
$this->addSql('ALTER TABLE mobconnect__short_distance_subscription CHANGE driving_license_number driving_licence_number VARCHAR(15) NOT NULL');
$this->addSql('ALTER TABLE user CHANGE driving_license_number driving_licence_number VARCHAR(15) DEFAULT NULL');
}
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 driving_licence_number driving_license_number VARCHAR(15) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE mobconnect__short_distance_subscription CHANGE driving_licence_number driving_license_number VARCHAR(15) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE user CHANGE driving_licence_number driving_license_number VARCHAR(15) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
}
}