Properly mark the tinyint column with a comment, so that migrations can properly detect that no changes are needed

This commit is contained in:
Jan Böhmer 2023-04-09 00:04:13 +02:00
parent aaf6c37871
commit 342ed382e3
5 changed files with 83 additions and 1 deletions

View file

@ -28,6 +28,7 @@ final class Version20230408213957 extends AbstractMultiPlatformMigration
}
$this->addSql('ALTER TABLE projects CHANGE description description LONGTEXT DEFAULT \'\' NOT NULL');
$this->addSql('ALTER TABLE users CHANGE permissions_data permissions_data LONGTEXT DEFAULT \'[]\' NOT NULL COMMENT \'(DC2Type:json)\', CHANGE saml_user saml_user TINYINT(1) NOT NULL, CHANGE about_me about_me LONGTEXT DEFAULT \'\' NOT NULL');
$this->addSql('ALTER TABLE log CHANGE level level TINYINT NOT NULL COMMENT \'(DC2Type:tinyint)\'');
}
public function mySQLDown(Schema $schema): void
@ -37,6 +38,7 @@ final class Version20230408213957 extends AbstractMultiPlatformMigration
$this->addSql('ALTER TABLE log CHANGE level level TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE projects CHANGE description description LONGTEXT NOT NULL');
$this->addSql('ALTER TABLE `users` CHANGE about_me about_me LONGTEXT NOT NULL, CHANGE saml_user saml_user TINYINT(1) DEFAULT 0 NOT NULL, CHANGE permissions_data permissions_data LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\'');
$this->addSql('ALTER TABLE log CHANGE level level TINYINT(1) NOT NULL');
}
public function sqLiteUp(Schema $schema): void