<?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 Version20220622143822 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 endpoind_path_fields (id INT AUTO_INCREMENT NOT NULL, static_field_type_id INT DEFAULT NULL, endpoind_id INT DEFAULT NULL, name VARCHAR(50) DEFAULT NULL, INDEX fk__endpoind_path_static_fields (static_field_type_id), INDEX fk_endpoind (endpoind_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE endpoind_path_fields ADD CONSTRAINT FK_4C853E323C78ABF FOREIGN KEY (static_field_type_id) REFERENCES static_fields (id)');
$this->addSql('ALTER TABLE endpoind_path_fields ADD CONSTRAINT FK_4C853E3271B629A9 FOREIGN KEY (endpoind_id) REFERENCES endpoinds (id)');
$this->addSql('ALTER TABLE endpoind_fields ADD required TINYINT(1) DEFAULT \'0\' NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE endpoind_path_fields');
$this->addSql('ALTER TABLE endpoind_fields DROP required');
}
}