<?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 Version20220621080815 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 api_documents (id INT AUTO_INCREMENT NOT NULL, api_id INT DEFAULT NULL, content LONGTEXT DEFAULT NULL, version VARCHAR(50) DEFAULT NULL, INDEX fk_document_api_id (api_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE api_documents ADD CONSTRAINT FK_DF64D7F354963938 FOREIGN KEY (api_id) REFERENCES apis (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE api_documents');
}
}