<?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 Version20220717121132 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 nursery_time_sheet (id INT AUTO_INCREMENT NOT NULL, establishment_id INT NOT NULL, school_year_id INT NOT NULL, registration_student_registration_id INT NOT NULL, create_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_by INT NOT NULL, updated_by INT NOT NULL, access VARCHAR(60) DEFAULT NULL, day VARCHAR(12) NOT NULL, month VARCHAR(10) NOT NULL, year VARCHAR(10) NOT NULL, INDEX IDX_E7B7B3208565851 (establishment_id), INDEX IDX_E7B7B320D2EECC3F (school_year_id), INDEX IDX_E7B7B320B0396129 (registration_student_registration_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE nursery_time_sheet ADD CONSTRAINT FK_E7B7B3208565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)');
$this->addSql('ALTER TABLE nursery_time_sheet ADD CONSTRAINT FK_E7B7B320D2EECC3F FOREIGN KEY (school_year_id) REFERENCES school_year (id)');
$this->addSql('ALTER TABLE nursery_time_sheet ADD CONSTRAINT FK_E7B7B320B0396129 FOREIGN KEY (registration_student_registration_id) REFERENCES registration_student_registration (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE nursery_time_sheet');
}
}