<?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 Version20240221090818 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
//removed this section as per client changes
// this up() migration is auto-generated, please modify it to your needs
// $cms_pages = $this->connection->fetchAssociative(
// 'SELECT id FROM cms_pages WHERE slug = :slug',
// ['slug' => 'supplier_list_sourcing']
// );
// $entries = [
// ['cms_id_id' => $cms_pages['id'], 'section_name' => 'Section 2', 'section_slug' => 'section_2', 'backend_template' => 'section_2', 'frontend_template' => 'section_2', 'position' => '2','deleted_at'=>null],
// ];
// foreach ($entries as $entry) {
// $existingEntry = $this->connection->fetchAssociative(
// 'SELECT * FROM cms_sections WHERE cms_id_id = :cms_id_id AND section_name = :section_name',
// ['cms_id_id' => $cms_pages['id'], 'section_name' => $entry['section_name']]
// );
// if (!$existingEntry) {
// $this->addSql('INSERT INTO cms_sections (cms_id_id, section_name , section_slug,backend_template,frontend_template,position,deleted_at) VALUES (:cms_id_id, :section_name, :section_slug, :backend_template,:frontend_template,:position,deleted_at)', [
// 'cms_id_id' => $entry['cms_id_id'],
// 'section_name' => $entry['section_name'],
// 'section_slug' => $entry['section_slug'],
// 'backend_template' => $entry['backend_template'],
// 'frontend_template' => $entry['frontend_template'],
// 'position' => $entry['position'],
// 'deleted_at' => $entry['deleted_at'],
// ]);
// }
// }
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
}
}