collection-crud/src/Migrations/Version20221027154708.php

109 lines
7.2 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 Version20221027154708 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 architecture VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD product_line VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD model VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD part_number VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD lot_number VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD micro_architecture VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD codename VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD base_speed INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD boost_speed INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD cores INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD threads INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD igp VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD voltage DOUBLE PRECISION DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD tdp INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD process_node INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD count INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD usable BOOLEAN NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD received BOOLEAN NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD link VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD notes VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_count INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_data_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_code_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_unified_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l1_way INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l2_count INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l2_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l2_way INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l3_count INT NOT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l3_size INT DEFAULT NULL');
$this->addSql('ALTER TABLE collection.cpu ADD l3_way INT DEFAULT NULL');
$this->addSql('COMMENT ON COLUMN collection.cpu.lot_number IS \'The CPU lot number, such as s-spec for Intel CPUs\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.base_speed IS \'The stock speed of the cpu in MHz\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.boost_speed IS \'The max boost speed of the cpu in MHz, if applicable\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.igp IS \'The name of the integrated graphics processor\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.usable IS \'Whether the chip is working, and can be used with other hardware I have\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.received IS \'Whether I have the chip in my possession (instead of in shipping)\'');
$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\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l1_data_size IS \'The size of each Level 1 data cache in KB\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l1_code_size IS \'The size of each Level 1 instruction cache in KB\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l1_unified_size IS \'The size of each Level 1 unified cache in KB\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l2_count IS \'The number of L2 caches on the package, usually the same as the number of cores\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l2_size IS \'The size of each Level 2 cache in KB\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l3_count IS \'The number of L3 caches on the package\'');
$this->addSql('COMMENT ON COLUMN collection.cpu.l3_size IS \'The size of each Level 3 cache in KB\'');
$this->addSql('ALTER TABLE collection.fpu ALTER series DROP NOT NULL');
}
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 DROP architecture');
$this->addSql('ALTER TABLE collection.cpu DROP product_line');
$this->addSql('ALTER TABLE collection.cpu DROP model');
$this->addSql('ALTER TABLE collection.cpu DROP part_number');
$this->addSql('ALTER TABLE collection.cpu DROP lot_number');
$this->addSql('ALTER TABLE collection.cpu DROP micro_architecture');
$this->addSql('ALTER TABLE collection.cpu DROP codename');
$this->addSql('ALTER TABLE collection.cpu DROP base_speed');
$this->addSql('ALTER TABLE collection.cpu DROP boost_speed');
$this->addSql('ALTER TABLE collection.cpu DROP cores');
$this->addSql('ALTER TABLE collection.cpu DROP threads');
$this->addSql('ALTER TABLE collection.cpu DROP igp');
$this->addSql('ALTER TABLE collection.cpu DROP voltage');
$this->addSql('ALTER TABLE collection.cpu DROP tdp');
$this->addSql('ALTER TABLE collection.cpu DROP process_node');
$this->addSql('ALTER TABLE collection.cpu DROP count');
$this->addSql('ALTER TABLE collection.cpu DROP usable');
$this->addSql('ALTER TABLE collection.cpu DROP received');
$this->addSql('ALTER TABLE collection.cpu DROP link');
$this->addSql('ALTER TABLE collection.cpu DROP notes');
$this->addSql('ALTER TABLE collection.cpu DROP l1_count');
$this->addSql('ALTER TABLE collection.cpu DROP l1_data_size');
$this->addSql('ALTER TABLE collection.cpu DROP l1_code_size');
$this->addSql('ALTER TABLE collection.cpu DROP l1_unified_size');
$this->addSql('ALTER TABLE collection.cpu DROP l1_way');
$this->addSql('ALTER TABLE collection.cpu DROP l2_count');
$this->addSql('ALTER TABLE collection.cpu DROP l2_size');
$this->addSql('ALTER TABLE collection.cpu DROP l2_way');
$this->addSql('ALTER TABLE collection.cpu DROP l3_count');
$this->addSql('ALTER TABLE collection.cpu DROP l3_size');
$this->addSql('ALTER TABLE collection.cpu DROP l3_way');
$this->addSql('ALTER TABLE collection.fpu ALTER series SET NOT NULL');
}
}