<?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 Version20220105073238 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('CREATE TABLE candidature_comment (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, candidature_id INT DEFAULT NULL, comment LONGTEXT DEFAULT NULL, INDEX IDX_7ECD2DBAA76ED395 (user_id), INDEX IDX_7ECD2DBAB6121583 (candidature_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE candidature_comment ADD CONSTRAINT FK_7ECD2DBAA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE candidature_comment ADD CONSTRAINT FK_7ECD2DBAB6121583 FOREIGN KEY (candidature_id) REFERENCES candidature (id)');
$this->addSql('ALTER TABLE job ADD COLUMN updatedAt DATETIME NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE candidature_comment');
$this->addSql('ALTER TABLE job DROP COLUMN updatedAt');
}
}