<?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 Version20220614082919 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 post_profile_reaction (id INT AUTO_INCREMENT NOT NULL, post_id INT DEFAULT NULL, user_profile_id INT DEFAULT NULL, reaction INT NOT NULL, INDEX IDX_1E99B9EC4B89032C (post_id), INDEX IDX_1E99B9EC6B9DD454 (user_profile_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE post_profile_reaction ADD CONSTRAINT FK_1E99B9EC4B89032C FOREIGN KEY (post_id) REFERENCES post (id)');
$this->addSql('ALTER TABLE post_profile_reaction ADD CONSTRAINT FK_1E99B9EC6B9DD454 FOREIGN KEY (user_profile_id) REFERENCES user_profile (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE post_profile_reaction');
}
}