<?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 Version20231214042051 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE saved_items (id INT AUTO_INCREMENT NOT NULL, folder_name VARCHAR(255) DEFAULT " ", parent_folder_id INT DEFAULT 0, type INT DEFAULT NULL, related_id INT DEFAULT 0, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', deleted_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql("ALTER TABLE saved_items MODIFY COLUMN type ENUM('folder', 'memo', 'education', 'podcast','directory','resource-directory','community-feed')");
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE saved_items');
}
}