<?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 Version20240219075230 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
$sql = 'SELECT `id` FROM `dtb_block` ORDER BY `id` DESC LIMIT 1';
$results = $this->connection->fetchAssociative($sql);
$lastId = (int) $results["id"] + 1;
$insert_block = "INSERT INTO dtb_block (id, device_type_id, block_name, file_name, use_controller, deletable, create_date, update_date, discriminator_type) VALUES ";
$this->addSql($insert_block . "($lastId ,10, 'Business', 'business', 0, 1, '2024-02-19 09:00:00', '2024-02-19 09:00:00', 'block');");
$lastId++;
$this->addSql($insert_block . "($lastId ,10, 'Concept', 'concept', 0, 1, '2024-02-19 09:00:00', '2024-02-19 09:00:00', 'block');");
$lastId++;
$this->addSql($insert_block . "($lastId ,10, 'Consulting', 'consulting', 0, 1, '2024-02-19 09:00:00', '2024-02-19 09:00:00', 'block');");
$lastId++;
$this->addSql($insert_block . "($lastId ,10, 'Corporate', 'corporate', 0, 1, '2024-02-19 09:00:00', '2024-02-19 09:00:00', 'block');");
$lastId++;
$this->addSql($insert_block . "($lastId ,10, 'Online Shop', 'online_shop', 0, 1, '2024-02-19 09:00:00', '2024-02-19 09:00:00', 'block');");
$lastId++;
$this->addSql($insert_block . "($lastId ,10, 'Recycle', 'recycle', 0, 1, '2024-02-19 09:00:00', '2024-02-19 09:00:00', 'block');");
$lastId++;
$this->addSql($insert_block . "($lastId ,10, 'Rental', 'rental', 0, 1, '2024-02-19 09:00:00', '2024-02-19 09:00:00', 'block');");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
}
}