PageRenderTime 45ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/src/OroCRM/Bundle/SalesBundle/Migrations/Schema/v1_3/OroCRMSalesBundle.php

https://github.com/jrcollado1987/crm
PHP | 30 lines | 21 code | 6 blank | 3 comment | 0 complexity | 3b5322d0d6c5b32e3851ba85844fc56a MD5 | raw file
  1. <?php
  2. namespace OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_3;
  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 OroCRMSalesBundle implements Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function up(Schema $schema, QueryBag $queries)
  13. {
  14. $salesFunnelTable = $schema->getTable('orocrm_sales_funnel');
  15. $salesFunnelTable->dropColumn('name');
  16. $salesFunnelTable->addIndex(array('startDate'), 'sales_start_idx');
  17. $leadTable = $schema->getTable('orocrm_sales_lead');
  18. $leadTable->addIndex(array('createdAt'), 'lead_created_idx');
  19. $opportunityTable = $schema->getTable('orocrm_sales_opportunity');
  20. $opportunityTable->getColumn('customer_need')->setType(Type::getType(Type::TEXT))->setLength(null);
  21. $opportunityTable->getColumn('proposed_solution')->setType(Type::getType(Type::TEXT))->setLength(null);
  22. $opportunityTable->addIndex(array('created_at'), 'opportunity_created_idx');
  23. }
  24. }