36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DoctrineMigrations;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
/**
|
|
* Auto-generated Migration: Please modify to your needs!
|
|
*/
|
|
final class Version20231004134943 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return '';
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
// this up() migration is auto-generated, please modify it to your needs
|
|
$this->addSql('ALTER TABLE assignment ADD job_profile_id INT DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE assignment ADD CONSTRAINT FK_30C544BAA68D82A5 FOREIGN KEY (job_profile_id) REFERENCES job_profile (id)');
|
|
$this->addSql('CREATE INDEX IDX_30C544BAA68D82A5 ON assignment (job_profile_id)');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
// this down() migration is auto-generated, please modify it to your needs
|
|
$this->addSql('ALTER TABLE assignment DROP FOREIGN KEY FK_30C544BAA68D82A5');
|
|
$this->addSql('DROP INDEX IDX_30C544BAA68D82A5 ON assignment');
|
|
$this->addSql('ALTER TABLE assignment DROP job_profile_id');
|
|
}
|
|
}
|