Clean migration for thirdparty bundle

This commit is contained in:
2024-09-19 14:39:03 +02:00
committed by Julien Fastré
parent 877c33e4ce
commit fa8f6d6f15
2 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace Chill\Migrations\ThirdParty;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20240918152229 extends AbstractMigration
{
public function getDescription(): string
{
return 'Drop foreign key profession_id and set not null on firstname';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_3party.third_party DROP profession_id');
$this->addSql('ALTER TABLE chill_3party.third_party ALTER firstname SET NOT NULL');
}
public function down(Schema $schema): void
{
}
}