forked from wallabag/wallabag
Make migrations noop instead of skipping
This commit is contained in:
@ -13,7 +13,11 @@ class Version20161022134138 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->skipIf(!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, 'This migration only apply to MySQL');
|
||||
if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->write('This migration only apply to MySQL');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;');
|
||||
|
||||
@ -41,7 +45,11 @@ class Version20161022134138 extends WallabagMigration
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->skipIf(!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, 'This migration only apply to MySQL');
|
||||
if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->write('This migration only apply to MySQL');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user