<?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 Version20220803144619 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 user_profile_follow (id INT AUTO_INCREMENT NOT NULL, follower_profile_id INT DEFAULT NULL, followed_profile_id INT DEFAULT NULL, created_at DATETIME NOT NULL, INDEX IDX_6B9BFC4EC3FDEF99 (follower_profile_id), INDEX IDX_6B9BFC4E20D8A785 (followed_profile_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE user_profile_follow ADD CONSTRAINT FK_6B9BFC4EC3FDEF99 FOREIGN KEY (follower_profile_id) REFERENCES user_profile (id)');
$this->addSql('ALTER TABLE user_profile_follow ADD CONSTRAINT FK_6B9BFC4E20D8A785 FOREIGN KEY (followed_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 user_profile_follow');
}
}