mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Properly escape users and groups table name for newer MySQL version
This commit is contained in:
parent
7eee3de965
commit
cc033d5be7
1 changed files with 4 additions and 4 deletions
|
@ -21,14 +21,14 @@ final class Version20230408213957 extends AbstractMultiPlatformMigration
|
||||||
public function mySQLUp(Schema $schema): void
|
public function mySQLUp(Schema $schema): void
|
||||||
{
|
{
|
||||||
// this up() migration is auto-generated, please modify it to your needs
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
$this->addSql('ALTER TABLE groups CHANGE permissions_data permissions_data LONGTEXT DEFAULT \'[]\' NOT NULL COMMENT \'(DC2Type:json)\'');
|
$this->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');
|
$this->addSql('ALTER TABLE `log` CHANGE level level TINYINT(4) NOT NULL');
|
||||||
if ($this->doesFKExists('projects', 'FK_11074E9A727ACA70')){
|
if ($this->doesFKExists('projects', 'FK_11074E9A727ACA70')){
|
||||||
$this->addSql('ALTER TABLE projects DROP FOREIGN KEY 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 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 `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)\'');
|
$this->addSql('ALTER TABLE `log` CHANGE level level TINYINT NOT NULL COMMENT \'(DC2Type:tinyint)\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mySQLDown(Schema $schema): void
|
public function mySQLDown(Schema $schema): void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue