<?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 Version20230123230632 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('CREATE TABLE order_payment (id INT AUTO_INCREMENT NOT NULL, related_order_id INT NOT NULL, status VARCHAR(64) NOT NULL, code VARCHAR(64) NOT NULL, url VARCHAR(255) DEFAULT NULL, value DOUBLE PRECISION NOT NULL, currency VARCHAR(4) NOT NULL, method_id VARCHAR(64) DEFAULT NULL, method_name VARCHAR(64) DEFAULT NULL, payment_date DATETIME DEFAULT NULL, INDEX IDX_9B522D462B1C2395 (related_order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE order_payment ADD CONSTRAINT FK_9B522D462B1C2395 FOREIGN KEY (related_order_id) REFERENCES `order` (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE order_payment');
}
}