migrations/Version20230126044534.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;/*** Auto-generated Migration: Please modify to your needs!*/final class Version20230126044534 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_children (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, date_of_birth DATE DEFAULT NULL, gender VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');$this->addSql('ALTER TABLE tennis_levels ADD user_children_id INT DEFAULT NULL');$this->addSql('ALTER TABLE tennis_levels ADD CONSTRAINT FK_212E3F1D9426EEDC FOREIGN KEY (user_children_id) REFERENCES user_children (id)');$this->addSql('CREATE INDEX IDX_212E3F1D9426EEDC ON tennis_levels (user_children_id)');}public function down(Schema $schema): void{// this down() migration is auto-generated, please modify it to your needs$this->addSql('ALTER TABLE tennis_levels DROP FOREIGN KEY FK_212E3F1D9426EEDC');$this->addSql('DROP TABLE user_children');$this->addSql('DROP INDEX IDX_212E3F1D9426EEDC ON tennis_levels');$this->addSql('ALTER TABLE tennis_levels DROP user_children_id');}}