<?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 Version20230121114009 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 tennis_group_session (id INT AUTO_INCREMENT NOT NULL, tennis_club_id INT DEFAULT NULL, administrator_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, max_players INT DEFAULT NULL, min_players INT DEFAULT NULL, gender_split VARCHAR(255) DEFAULT NULL, day_of_week VARCHAR(255) DEFAULT NULL, repeat_frequency VARCHAR(255) DEFAULT NULL, time_start TIME DEFAULT NULL, time_end TIME DEFAULT NULL, courts INT DEFAULT NULL, INDEX IDX_CC6FC29666CACA70 (tennis_club_id), INDEX IDX_CC6FC2964B09E92C (administrator_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE tennis_group_session ADD CONSTRAINT FK_CC6FC29666CACA70 FOREIGN KEY (tennis_club_id) REFERENCES tennis_venues (id)');
$this->addSql('ALTER TABLE tennis_group_session ADD CONSTRAINT FK_CC6FC2964B09E92C FOREIGN KEY (administrator_id) REFERENCES user (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE tennis_group_session');
}
}