add version property to accompanyingperiodwork for optimistic locking

This commit is contained in:
2023-11-29 14:04:19 +01:00
committed by Julien Fastré
parent 8ef001e67e
commit 1d21499eab
2 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace Chill\Migrations\Person;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20231129113816 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add versioning to accompanying period work';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_person_accompanying_period_work ADD version INT DEFAULT 1 NOT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_person_accompanying_period_work DROP version');
}
}