2020-04-09 15:17:46 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace DoctrineMigrations;
|
|
|
|
|
2020-07-04 23:38:18 +02:00
|
|
|
use App\Migration\AbstractMultiPlatformMigration;
|
2020-04-09 15:17:46 +02:00
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Auto-generated Migration: Please modify to your needs!
|
|
|
|
*/
|
2020-06-13 23:58:59 +02:00
|
|
|
final class Version20200409130946 extends AbstractMultiPlatformMigration
|
2020-04-09 15:17:46 +02:00
|
|
|
{
|
2020-04-10 13:05:08 +02:00
|
|
|
public function getDescription(): string
|
2020-04-09 15:17:46 +02:00
|
|
|
{
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
2020-06-13 23:58:59 +02:00
|
|
|
public function mySQLUp(Schema $schema): void
|
2020-04-09 15:17:46 +02:00
|
|
|
{
|
|
|
|
// this up() migration is auto-generated, please modify it to your needs
|
2022-03-04 18:51:58 +01:00
|
|
|
$this->abortIf('mysql' !== $this->getDatabaseType(), 'Migration can only be executed safely on \'mysql\'.');
|
2020-04-09 15:17:46 +02:00
|
|
|
|
|
|
|
$this->addSql('ALTER TABLE u2f_keys CHANGE key_handle key_handle VARCHAR(128) NOT NULL');
|
|
|
|
}
|
|
|
|
|
2020-06-13 23:58:59 +02:00
|
|
|
public function mySQLDown(Schema $schema): void
|
2020-04-09 15:17:46 +02:00
|
|
|
{
|
|
|
|
// this down() migration is auto-generated, please modify it to your needs
|
2022-03-04 18:51:58 +01:00
|
|
|
$this->abortIf('mysql' !== $this->getDatabaseType(), 'Migration can only be executed safely on \'mysql\'.');
|
2020-04-09 15:17:46 +02:00
|
|
|
|
|
|
|
$this->addSql('ALTER TABLE u2f_keys CHANGE key_handle key_handle VARCHAR(64) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
|
|
|
|
}
|
2020-06-13 23:58:59 +02:00
|
|
|
|
|
|
|
public function sqLiteUp(Schema $schema): void
|
|
|
|
{
|
2020-07-04 23:38:18 +02:00
|
|
|
$this->warnIf(true, "Migration not needed for SQLite. Skipping...");
|
2020-06-13 23:58:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function sqLiteDown(Schema $schema): void
|
|
|
|
{
|
2020-07-04 23:38:18 +02:00
|
|
|
$this->warnIf(true, "Migration not needed for SQLite. Skipping...");
|
2020-06-13 23:58:59 +02:00
|
|
|
}
|
2020-04-09 15:17:46 +02:00
|
|
|
}
|