<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20150722131912 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
// $this->addSql('ALTER TABLE coin_denomination DROP PRIMARY KEY');
// $this->addSql('ALTER TABLE coin_denomination DROP id, DROP creation_date, CHANGE coin_id coin_id INT NOT NULL, CHANGE denomination_id denomination_id INT NOT NULL');
// $this->addSql('ALTER TABLE coin_denomination ADD CONSTRAINT FK_6DB01A8884BBDA7 FOREIGN KEY (coin_id) REFERENCES coin (id)');
// $this->addSql('ALTER TABLE coin_denomination ADD CONSTRAINT FK_6DB01A88E9293F06 FOREIGN KEY (denomination_id) REFERENCES denomination (id)');
$this->addSql('CREATE INDEX IDX_6DB01A8884BBDA7 ON coin_denomination (coin_id)');
$this->addSql('CREATE INDEX IDX_6DB01A88E9293F06 ON coin_denomination (denomination_id)');
// $this->addSql('ALTER TABLE coin_mint DROP id, DROP creation_date, CHANGE coin_id coin_id INT NOT NULL, CHANGE mint_id mint_id INT NOT NULL');
// $this->addSql('ALTER TABLE coin_mint ADD CONSTRAINT FK_3EE308A384BBDA7 FOREIGN KEY (coin_id) REFERENCES coin (id)');
// $this->addSql('ALTER TABLE coin_mint ADD CONSTRAINT FK_3EE308A33A94E0C FOREIGN KEY (mint_id) REFERENCES mint (id)');
$this->addSql('CREATE INDEX IDX_3EE308A384BBDA7 ON coin_mint (coin_id)');
$this->addSql('CREATE INDEX IDX_3EE308A33A94E0C ON coin_mint (mint_id)');
// $this->addSql('ALTER TABLE coin_mint ADD PRIMARY KEY (coin_id, mint_id)');
// $this->addSql('ALTER TABLE coin_person DROP PRIMARY KEY');
// $this->addSql('ALTER TABLE coin_person DROP id, DROP creation_date, CHANGE coin_id coin_id INT NOT NULL, CHANGE person_id person_id INT NOT NULL');
// $this->addSql('ALTER TABLE coin_person ADD CONSTRAINT FK_E77F72D584BBDA7 FOREIGN KEY (coin_id) REFERENCES coin (id)');
// $this->addSql('ALTER TABLE coin_person ADD CONSTRAINT FK_E77F72D5217BBB47 FOREIGN KEY (person_id) REFERENCES person (id)');
$this->addSql('CREATE INDEX IDX_E77F72D584BBDA7 ON coin_person (coin_id)');
$this->addSql('CREATE INDEX IDX_E77F72D5217BBB47 ON coin_person (person_id)');
// $this->addSql('ALTER TABLE coin_person ADD PRIMARY KEY (coin_id, person_id)');
// $this->addSql('ALTER TABLE coin_reign DROP PRIMARY KEY');
// $this->addSql('ALTER TABLE coin_reign DROP id, DROP creation_date, CHANGE coin_id coin_id INT NOT NULL, CHANGE reign_id reign_id INT NOT NULL');
// $this->addSql('ALTER TABLE coin_reign ADD CONSTRAINT FK_FB2F5A7484BBDA7 FOREIGN KEY (coin_id) REFERENCES coin (id)');
// $this->addSql('ALTER TABLE coin_reign ADD CONSTRAINT FK_FB2F5A7414C9431B FOREIGN KEY (reign_id) REFERENCES reign (id)');
$this->addSql('CREATE INDEX IDX_FB2F5A7484BBDA7 ON coin_reign (coin_id)');
$this->addSql('CREATE INDEX IDX_FB2F5A7414C9431B ON coin_reign (reign_id)');
// $this->addSql('ALTER TABLE coin_reign ADD PRIMARY KEY (coin_id, reign_id)');
// $this->addSql('ALTER TABLE coin_image CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
}
}