<?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 Version20210909090035 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE transaction (id INT AUTO_INCREMENT NOT NULL, commande_id INT DEFAULT NULL, amount DOUBLE PRECISION NOT NULL, status INT NOT NULL, reference VARCHAR(255) DEFAULT NULL, payid VARCHAR(255) DEFAULT NULL, payidsub VARCHAR(255) DEFAULT NULL, ncerror VARCHAR(255) DEFAULT NULL, ip VARCHAR(255) DEFAULT NULL, trxdate VARCHAR(255) DEFAULT NULL, alias VARCHAR(255) DEFAULT NULL, INDEX IDX_723705D182EA2E54 (commande_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE transaction ADD CONSTRAINT FK_723705D182EA2E54 FOREIGN KEY (commande_id) REFERENCES commande (id)');
}
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\'.');
$this->addSql('DROP TABLE transaction');
}
}