<?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 Version20231228085814 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 projeler (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, resim LONGTEXT NOT NULL, dilgrup INT NOT NULL, sira INT DEFAULT NULL, INDEX IDX_7311E71F5E75AD4A (dil_id), INDEX IDX_7311E71F4AF95CEB (sayfa_id), INDEX IDX_7311E71FF89C2B38 (kategori_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE projeler ADD CONSTRAINT FK_7311E71F5E75AD4A FOREIGN KEY (dil_id) REFERENCES dil (id)');
$this->addSql('ALTER TABLE projeler ADD CONSTRAINT FK_7311E71F4AF95CEB FOREIGN KEY (sayfa_id) REFERENCES sayfa (id)');
$this->addSql('ALTER TABLE projeler ADD CONSTRAINT FK_7311E71FF89C2B38 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 projeler');
}
}