<?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 Version20240528092116 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 workshop (id INT AUTO_INCREMENT NOT NULL, contributor_id INT DEFAULT NULL, workshop_category_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, info_workshop LONGTEXT DEFAULT NULL, activity_workshop LONGTEXT DEFAULT NULL, INDEX IDX_9B6F02C47A19A357 (contributor_id), INDEX IDX_9B6F02C42F19F6AC (workshop_category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE workshop ADD CONSTRAINT FK_9B6F02C47A19A357 FOREIGN KEY (contributor_id) REFERENCES contributor (id)');
$this->addSql('ALTER TABLE workshop ADD CONSTRAINT FK_9B6F02C42F19F6AC FOREIGN KEY (workshop_category_id) REFERENCES workshop_category (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE workshop');
}
}