Completed
Push — master ( 3b7290...73d268 )
by
unknown
11:56
created

RemoveOpportunityOldStatus   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 24
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getOrder() 0 4 1
A up() 0 10 3
1
<?php
2
3
namespace OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_22;
4
5
use Doctrine\DBAL\Schema\Schema;
6
7
use Oro\Bundle\MigrationBundle\Migration\OrderedMigrationInterface;
8
9
use Oro\Bundle\MigrationBundle\Migration\Migration;
10
use Oro\Bundle\MigrationBundle\Migration\QueryBag;
11
12
class RemoveOpportunityOldStatus implements Migration, OrderedMigrationInterface
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function getOrder()
18
    {
19
        return 3;
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function up(Schema $schema, QueryBag $queries)
26
    {
27
        $table = $schema->getTable('orocrm_sales_opportunity');
28
        if ($table->hasIndex('idx_c0fe4aac6625d392')) {
29
            $table->dropIndex('idx_c0fe4aac6625d392');
30
        }
31
        if ($table->hasColumn('status_name')) {
32
            $table->dropColumn('status_name');
33
        }
34
    }
35
}
36