<?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 Version20220627151705 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 endpoind_fields ADD static_field_format_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE endpoind_fields ADD CONSTRAINT FK_3F48715C67BFE15 FOREIGN KEY (static_field_format_id) REFERENCES static_field_formats (id)');
$this->addSql('CREATE INDEX IDX_3F48715C67BFE15 ON endpoind_fields (static_field_format_id)');
$this->addSql('ALTER TABLE endpoind_path_fields ADD static_field_format_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE endpoind_path_fields ADD CONSTRAINT FK_4C853E3267BFE15 FOREIGN KEY (static_field_format_id) REFERENCES static_field_formats (id)');
$this->addSql('CREATE INDEX IDX_4C853E3267BFE15 ON endpoind_path_fields (static_field_format_id)');
$this->addSql('ALTER TABLE model_fields ADD static_field_format_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE model_fields ADD CONSTRAINT FK_5D02C71767BFE15 FOREIGN KEY (static_field_format_id) REFERENCES static_field_formats (id)');
$this->addSql('CREATE INDEX IDX_5D02C71767BFE15 ON model_fields (static_field_format_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE endpoind_fields DROP FOREIGN KEY FK_3F48715C67BFE15');
$this->addSql('DROP INDEX IDX_3F48715C67BFE15 ON endpoind_fields');
$this->addSql('ALTER TABLE endpoind_fields DROP static_field_format_id');
$this->addSql('ALTER TABLE endpoind_path_fields DROP FOREIGN KEY FK_4C853E3267BFE15');
$this->addSql('DROP INDEX IDX_4C853E3267BFE15 ON endpoind_path_fields');
$this->addSql('ALTER TABLE endpoind_path_fields DROP static_field_format_id');
$this->addSql('ALTER TABLE model_fields DROP FOREIGN KEY FK_5D02C71767BFE15');
$this->addSql('DROP INDEX IDX_5D02C71767BFE15 ON model_fields');
$this->addSql('ALTER TABLE model_fields DROP static_field_format_id');
}
}