diff --git a/src/Bundle/ChillEventBundle/Entity/Event.php b/src/Bundle/ChillEventBundle/Entity/Event.php index e7b0346cd..f01f21cd8 100644 --- a/src/Bundle/ChillEventBundle/Entity/Event.php +++ b/src/Bundle/ChillEventBundle/Entity/Event.php @@ -115,6 +115,12 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter #[Serializer\Groups(['read'])] private Collection $budgetElements; + /** + * @deprecated use budgetElements instead + */ + #[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 4, nullable: true, options: ['default' => '0.0'])] + private string $organizationCost = '0.0'; + /** * Event constructor. */ @@ -383,4 +389,15 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter { $this->documents = $documents; } + + public function getOrganizationCost(): string + { + return $this->organizationCost; + } + + public function setOrganizationCost(string $organizationCost): void + { + $this->organizationCost = $organizationCost; + } + } diff --git a/src/Bundle/ChillEventBundle/migrations/Version20250507073301.php b/src/Bundle/ChillEventBundle/migrations/Version20250507073301.php index 942172061..e5d7f0e52 100644 --- a/src/Bundle/ChillEventBundle/migrations/Version20250507073301.php +++ b/src/Bundle/ChillEventBundle/migrations/Version20250507073301.php @@ -14,9 +14,6 @@ namespace Chill\Migrations\Event; use Doctrine\DBAL\Schema\Schema; use Doctrine\Migrations\AbstractMigration; -/** - * Auto-generated Migration: Please modify to your needs! - */ final class Version20250507073301 extends AbstractMigration { public function getDescription(): string @@ -41,9 +38,6 @@ final class Version20250507073301 extends AbstractMigration $this->addSql(<<<'SQL' ALTER TABLE chill_event_thirdparty ADD CONSTRAINT FK_9946573EC7D3A8E6 FOREIGN KEY (thirdparty_id) REFERENCES chill_3party.third_party (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE SQL); - $this->addSql(<<<'SQL' - ALTER TABLE chill_event_event DROP organizationcost - SQL); } public function down(Schema $schema): void @@ -57,8 +51,5 @@ final class Version20250507073301 extends AbstractMigration $this->addSql(<<<'SQL' DROP TABLE chill_event_thirdparty SQL); - $this->addSql(<<<'SQL' - ALTER TABLE chill_event_event ADD organizationcost NUMERIC(10, 4) DEFAULT '0.0' - SQL); } }