PageRenderTime 44ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/src/OroCRM/Bundle/MagentoBundle/Migrations/Schema/v1_5/OroCrmMagentoBundle.php

https://github.com/jrcollado1987/crm
PHP | 29 lines | 20 code | 6 blank | 3 comment | 0 complexity | 32689d73fa715c260cd7b6ee4c7f6383 MD5 | raw file
  1. <?php
  2. namespace OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_5;
  3. use Doctrine\DBAL\Schema\Schema;
  4. use Doctrine\DBAL\Types\Type;
  5. use Oro\Bundle\MigrationBundle\Migration\Migration;
  6. use Oro\Bundle\MigrationBundle\Migration\QueryBag;
  7. class OroCrmMagentoBundle implements Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function up(Schema $schema, QueryBag $queries)
  13. {
  14. $cartTable = $schema->getTable('orocrm_magento_cart');
  15. $cartTable->addColumn('first_name', 'string', ['notnull' => false, 'length' => 255]);
  16. $cartTable->addColumn('last_name', 'string', ['notnull' => false, 'length' => 255]);
  17. $orderTable = $schema->getTable('orocrm_magento_order');
  18. $orderTable->addColumn('first_name', 'string', ['notnull' => false, 'length' => 255]);
  19. $orderTable->addColumn('last_name', 'string', ['notnull' => false, 'length' => 255]);
  20. $customerTable = $schema->getTable('orocrm_magento_customer');
  21. $customerTable->getColumn('birthday')->setType(Type::getType(Type::DATE));
  22. }
  23. }