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

RemoveOpportunityStatusFK::up()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 2
eloc 4
nc 2
nop 2
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 RemoveOpportunityStatusFK implements Migration, OrderedMigrationInterface
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function getOrder()
18
    {
19
        return 2;
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->hasForeignKey('FK_C0FE4AAC6625D392')) {
29
            $table->removeForeignKey('FK_C0FE4AAC6625D392');
30
        }
31
    }
32
}
33