<?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 Version20230228082536 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 settings (id INT AUTO_INCREMENT NOT NULL, club_id INT NOT NULL, max_number_of_bookings_in_year INT DEFAULT NULL, max_number_of_future_bookings INT DEFAULT NULL, max_number_of_no_shows INT DEFAULT NULL, no_show_period INT DEFAULT NULL, no_show_booking_policy VARCHAR(255) DEFAULT NULL, no_show_charge TINYINT(1) DEFAULT NULL, max_cancelled_bookings INT DEFAULT NULL, cancel_booking_latency INT DEFAULT NULL, UNIQUE INDEX UNIQ_E545A0C561190A32 (club_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE settings ADD CONSTRAINT FK_E545A0C561190A32 FOREIGN KEY (club_id) REFERENCES tennis_venues (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE settings');
}
}