<?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 Version20240819054553 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 gal (id INT AUTO_INCREMENT NOT NULL, dil_id INT NOT NULL, sayfa_id INT NOT NULL, kategori_id INT DEFAULT NULL, baslik VARCHAR(255) NOT NULL, metin LONGTEXT DEFAULT NULL, resimler LONGTEXT DEFAULT NULL, dilgrup INT NOT NULL, sira INT DEFAULT NULL, INDEX IDX_8A3B73225E75AD4A (dil_id), INDEX IDX_8A3B73224AF95CEB (sayfa_id), INDEX IDX_8A3B7322F89C2B38 (kategori_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE gal ADD CONSTRAINT FK_8A3B73225E75AD4A FOREIGN KEY (dil_id) REFERENCES dil (id)');
$this->addSql('ALTER TABLE gal ADD CONSTRAINT FK_8A3B73224AF95CEB FOREIGN KEY (sayfa_id) REFERENCES sayfa (id)');
$this->addSql('ALTER TABLE gal ADD CONSTRAINT FK_8A3B7322F89C2B38 FOREIGN KEY (kategori_id) REFERENCES kategori (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE gal');
}
}