<?php
declare(strict_types=1);
namespace Boldr\Shop\ReceiptPrinterBundle\Migrations;
use Boldr\Cms\CmsBundle\BoldrCmsMigration;
use Doctrine\DBAL\Schema\Schema;
final class Version1_3_0 extends BoldrCmsMigration
{
public function getBundle(): string { return 'boldr/receipt-printer-bundle'; }
public function getVersion(): string { return '1.3.0'; }
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE shop_receipt_printer_initial_receipt (order_id INT UNSIGNED NOT NULL, PRIMARY KEY(order_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE shop_receipt_printer_initial_receipt ADD CONSTRAINT FK_555928118D9F6D38 FOREIGN KEY (order_id) REFERENCES shop_order (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE shop_receipt_printer_initial_receipt');
}
}