Completed
Push — master ( 0b205b...bde6a0 )
by
unknown
10:16
created

B2BStatisticsWidgetName   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A up() 0 10 1
1
<?php
2
3
namespace OroCRM\Bundle\SalesBundle\Migrations\Schema\v1_25_1;
4
5
use Doctrine\DBAL\Schema\Schema;
6
use Doctrine\DBAL\Types\Type;
7
8
use Oro\Bundle\MigrationBundle\Migration\Migration;
9
use Oro\Bundle\MigrationBundle\Migration\QueryBag;
10
use Oro\Bundle\MigrationBundle\Migration\ParametrizedSqlMigrationQuery;
11
12
class B2BStatisticsWidgetName implements Migration
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function up(Schema $schema, QueryBag $queries)
18
    {
19
        $queries->addQuery(
20
            new ParametrizedSqlMigrationQuery(
21
                'UPDATE oro_dashboard_widget SET name = :newName WHERE name = :oldName',
22
                ['oldName' => 'b2b_statistics_widget', 'newName' => 'business_sales_channel_statistics'],
23
                ['oldName' => Type::STRING, 'newName' => Type::STRING]
24
            )
25
        );
26
    }
27
}
28