Updated migrations
testing/ogcore-api/pipeline/head This commit looks good
Details
testing/ogcore-api/pipeline/head This commit looks good
Details
parent
8e21a10361
commit
0cf373303a
|
@ -0,0 +1,31 @@
|
|||
<?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 Version20250304115209 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 user CHANGE groups_view groups_view VARCHAR(255) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE user CHANGE groups_view groups_view VARCHAR(255) NOT NULL');
|
||||
}
|
||||
}
|
|
@ -24,7 +24,7 @@ final class UserOutput extends AbstractOutput
|
|||
#[Groups(['user:read'])]
|
||||
public array $userGroups;
|
||||
#[Groups(['user:read'])]
|
||||
public string $groupsView;
|
||||
public ?string $groupsView = 'card';
|
||||
|
||||
#[Groups(['user:read'])]
|
||||
public \DateTime $createdAt;
|
||||
|
|
|
@ -51,7 +51,7 @@ class User extends AbstractEntity implements UserInterface, PasswordAuthenticate
|
|||
private ?string $newPassword = null;
|
||||
private ?string $repeatNewPassword = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $groupsView = null;
|
||||
|
||||
|
||||
|
@ -254,7 +254,7 @@ class User extends AbstractEntity implements UserInterface, PasswordAuthenticate
|
|||
return $this->groupsView;
|
||||
}
|
||||
|
||||
public function setGroupsView(string $groupsView): static
|
||||
public function setGroupsView(?string $groupsView): static
|
||||
{
|
||||
$this->groupsView = $groupsView;
|
||||
|
||||
|
|
Loading…
Reference in New Issue