add urgent property to calendar entity

This commit is contained in:
Julie Lenaerts 2022-09-21 12:20:39 +02:00
parent 236e89a6ae
commit e90ff67e33
2 changed files with 38 additions and 0 deletions

View File

@ -203,6 +203,11 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface
*/ */
private string $status = self::STATUS_VALID; private string $status = self::STATUS_VALID;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $urgent = false;
public function __construct() public function __construct()
{ {
$this->comment = new CommentEmbeddable(); $this->comment = new CommentEmbeddable();

View File

@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
namespace Chill\Migrations\Calendar;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220921101643 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add urgent property to calendar entity';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE chill_calendar.calendar ADD urgent BOOLEAN DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE chill_calendar.calendar DROP urgent');
}
}