crm /src/OroCRM/Bundle/MagentoBundle/Migrations/Schema/v1_2/OroCrmMagentoBundle.php

Language PHP Lines 57
MD5 Hash 4e2e711a5a4ac825e212a071efb6066e Estimated Cost $1,041 (why?)
Repository https://github.com/jrcollado1987/crm.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php

namespace OroCRM\Bundle\MagentoBundle\Migrations\Schema\v1_2;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
use Oro\Bundle\MigrationBundle\Migration\Migration;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;

class OroCRMMagentoBundle implements Migration
{
    /**
     * @inheritdoc
     */
    public function up(Schema $schema, QueryBag $queries)
    {
        $table = $schema->getTable('orocrm_magento_order_items');
        $table->getColumn('original_price')->setType(Type::getType('money'));
        $table->getColumn('discount_percent')->setType(Type::getType('percent'));
        $table->getColumn('price')->setType(Type::getType('money'));
        $table->getColumn('tax_percent')->setType(Type::getType('percent'));
        $table->getColumn('tax_amount')->setType(Type::getType('money'));
        $table->getColumn('discount_amount')->setType(Type::getType('money'));
        $table->getColumn('row_total')->setType(Type::getType('money'));

        $table = $schema->getTable('orocrm_magento_product');
        $table->getColumn('special_price')->setType(Type::getType('money'));
        $table->getColumn('price')->setType(Type::getType('money'));
        $table->getColumn('cost')->setType(Type::getType('money'));

        $table = $schema->getTable('orocrm_magento_cart');
        $table->getColumn('sub_total')->setType(Type::getType('money'));
        $table->getColumn('grand_total')->setType(Type::getType('money'));
        $table->getColumn('tax_amount')->setType(Type::getType('money'));

        $table = $schema->getTable('orocrm_magento_order');
        $table->getColumn('total_invoiced_amount')->setType(Type::getType('money'));
        $table->getColumn('total_refunded_amount')->setType(Type::getType('money'));
        $table->getColumn('total_canceled_amount')->setType(Type::getType('money'));
        $table->getColumn('subtotal_amount')->setType(Type::getType('money'));
        $table->getColumn('shipping_amount')->setType(Type::getType('money'));
        $table->getColumn('tax_amount')->setType(Type::getType('money'));
        $table->getColumn('discount_amount')->setType(Type::getType('money'));
        $table->getColumn('total_amount')->setType(Type::getType('money'));
        $table->getColumn('discount_percent')->setType(Type::getType('percent'));

        $table = $schema->getTable('orocrm_magento_cart_item');
        $table->getColumn('custom_price')->setType(Type::getType('money'));
        $table->getColumn('price_incl_tax')->setType(Type::getType('money'));
        $table->getColumn('row_total')->setType(Type::getType('money'));
        $table->getColumn('tax_amount')->setType(Type::getType('money'));
        $table->getColumn('price')->setType(Type::getType('money'));
        $table->getColumn('discount_amount')->setType(Type::getType('money'));
        $table->getColumn('tax_percent')->setType(Type::getType('percent'));
    }
}
Back to Top