From aaf6c37871b52d61790b1b922a45f2fa27b4e73d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sat, 8 Apr 2023 23:49:47 +0200 Subject: [PATCH] Fixed some minor issues in database schema of MySQL --- migrations/Version20230408170059.php | 2 +- migrations/Version20230408213957.php | 51 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 migrations/Version20230408213957.php diff --git a/migrations/Version20230408170059.php b/migrations/Version20230408170059.php index 9f686c38..88be7798 100644 --- a/migrations/Version20230408170059.php +++ b/migrations/Version20230408170059.php @@ -15,7 +15,7 @@ final class Version20230408170059 extends AbstractMultiPlatformMigration { public function getDescription(): string { - return ''; + return 'Add show_email_on_profile option'; } public function mySQLUp(Schema $schema): void diff --git a/migrations/Version20230408213957.php b/migrations/Version20230408213957.php new file mode 100644 index 00000000..17b3c8a1 --- /dev/null +++ b/migrations/Version20230408213957.php @@ -0,0 +1,51 @@ +addSql('ALTER TABLE groups CHANGE permissions_data permissions_data LONGTEXT DEFAULT \'[]\' NOT NULL COMMENT \'(DC2Type:json)\''); + $this->addSql('ALTER TABLE log CHANGE level level TINYINT(4) NOT NULL'); + if ($this->doesFKExists('projects', 'FK_11074E9A727ACA70')){ + $this->addSql('ALTER TABLE projects DROP FOREIGN KEY FK_11074E9A727ACA70'); + } + $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'); + } + + public function mySQLDown(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE `groups` CHANGE permissions_data permissions_data LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\''); + $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)\''); + } + + public function sqLiteUp(Schema $schema): void + { + // TODO: Implement sqLiteUp() method. + } + + public function sqLiteDown(Schema $schema): void + { + // TODO: Implement sqLiteDown() method. + } +}