mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Reverse deleting of organizationCost property on event entity to keep db data
This commit is contained in:
parent
5e5d23c320
commit
61281a0900
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user