Part-DB.Part-DB-server/src/Migrations/Version20200409130946.php

36 lines
1.1 KiB
PHP
Raw Normal View History

<?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 Version20200409130946 extends AbstractMigration
{
2020-04-10 13:05:08 +02:00
public function getDescription(): string
{
return '';
}
2020-04-10 13:05:08 +02:00
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
2020-04-10 13:05:08 +02:00
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE u2f_keys CHANGE key_handle key_handle VARCHAR(128) NOT NULL');
}
2020-04-10 13:05:08 +02:00
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
2020-04-10 13:05:08 +02:00
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE u2f_keys CHANGE key_handle key_handle VARCHAR(64) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
}