vendor/boldr/receipt-printer-bundle/migrations/Version1_3_0.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Boldr\Shop\ReceiptPrinterBundle\Migrations;
  4. use Boldr\Cms\CmsBundle\BoldrCmsMigration;
  5. use Doctrine\DBAL\Schema\Schema;
  6. final class Version1_3_0 extends BoldrCmsMigration
  7. {
  8. public function getBundle(): string { return 'boldr/receipt-printer-bundle'; }
  9. public function getVersion(): string { return '1.3.0'; }
  10. public function up(Schema $schema): void
  11. {
  12. // this up() migration is auto-generated, please modify it to your needs
  13. $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');
  14. $this->addSql('ALTER TABLE shop_receipt_printer_initial_receipt ADD CONSTRAINT FK_555928118D9F6D38 FOREIGN KEY (order_id) REFERENCES shop_order (id)');
  15. }
  16. public function down(Schema $schema): void
  17. {
  18. // this down() migration is auto-generated, please modify it to your needs
  19. $this->addSql('DROP TABLE shop_receipt_printer_initial_receipt');
  20. }
  21. }