<?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 Version20260112090626 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 urun (id INT AUTO_INCREMENT NOT NULL, dil_id INT NOT NULL, sayfa_id INT NOT NULL, kategori_id INT DEFAULT NULL, seourl VARCHAR(255) NOT NULL, sayfabasligi VARCHAR(255) NOT NULL, anahtarkelimeler LONGTEXT DEFAULT NULL, sayfaaciklamasi LONGTEXT DEFAULT NULL, adi VARCHAR(255) NOT NULL, metin LONGTEXT DEFAULT NULL, resimler LONGTEXT DEFAULT NULL, dilgrup INT NOT NULL, sira INT DEFAULT NULL, INDEX IDX_D292F2605E75AD4A (dil_id), INDEX IDX_D292F2604AF95CEB (sayfa_id), INDEX IDX_D292F260F89C2B38 (kategori_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE urun ADD CONSTRAINT FK_D292F2605E75AD4A FOREIGN KEY (dil_id) REFERENCES dil (id)');
$this->addSql('ALTER TABLE urun ADD CONSTRAINT FK_D292F2604AF95CEB FOREIGN KEY (sayfa_id) REFERENCES sayfa (id)');
$this->addSql('ALTER TABLE urun ADD CONSTRAINT FK_D292F260F89C2B38 FOREIGN KEY (kategori_id) REFERENCES kategori (id)');
$this->addSql('ALTER TABLE hizmetler ADD dosya LONGTEXT NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE urun');
$this->addSql('ALTER TABLE hizmetler DROP dosya');
}
}