mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-30 23:09:32 +00:00
Make PermissionData an embeddable so doctrine can properly track changes to the data array
This commit is contained in:
parent
687ee80255
commit
59ddf91527
5 changed files with 53 additions and 47 deletions
33
migrations/Version20221031195841.php
Normal file
33
migrations/Version20221031195841.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20221031195841 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE groups ADD permissions_data LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\'');
|
||||
$this->addSql('ALTER TABLE users ADD permissions_data LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\'');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE `groups` DROP permissions_data');
|
||||
$this->addSql('ALTER TABLE `users` DROP permissions_data');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue