Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.

Commit

Permalink
Added migration for new Order fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoreram committed Nov 18, 2015
1 parent 0f03bef commit fb1d3f4
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions app/DoctrineMigrations/Version20151119001829.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Application\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20151119001829 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
// 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 orders ADD shipping_method_extra LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', ADD payment_method LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', ADD payment_method_extra LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
}

/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
// 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('ALTER TABLE orders DROP shipping_method_extra, DROP payment_method, DROP payment_method_extra');
}
}

0 comments on commit fb1d3f4

Please sign in to comment.