collection-crud/src/Migrations/Version20221027211813.php

45 lines
2.1 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221027211813 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('ALTER TABLE collection.cpu ADD l1_data_count INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_code_count INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_unified_count INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu DROP l1_count');
$this->addSql('ALTER TABLE collection.cpu RENAME COLUMN l1_way TO l1_unified_way');
$this->addSql('COMMENT ON COLUMN collection.cpu.l1_data_count IS \'The number of L1 data caches on the package, usually the same as the number of cores\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l1_code_count IS \'The number of L1 instruction caches on the package, usually the same as the number of cores\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l1_unified_count IS \'The number of L1 caches on the package, usually the same as the number of cores\'');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE collection.cpu ADD l1_count INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu DROP l1_data_count');
$this->addSql('ALTER TABLE collection.cpu DROP l1_code_count');
$this->addSql('ALTER TABLE collection.cpu DROP l1_unified_count');
$this->addSql('ALTER TABLE collection.cpu RENAME COLUMN l1_unified_way TO l1_way');
$this->addSql('COMMENT ON COLUMN collection.cpu.l1_count IS \'The number of L1 caches on the package, usually the same as the number of cores\'');
}
}