m191008_163429_objectId::safeUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/hubspot/license
6
 * @link       https://www.flipboxfactory.com/software/hubspot/
7
 */
8
9
namespace flipbox\craft\hubspot\migrations;
10
11
use craft\db\Migration;
12
use flipbox\craft\hubspot\records\ObjectAssociation;
13
use yii\db\Schema;
14
15
class m191008_163429_objectId extends Migration
16
{
17
    /**
18
     * @inheritdoc
19
     * @throws \yii\base\NotSupportedException
20
     * @throws \yii\db\Exception
21
     */
22
    public function safeUp()
23
    {
24
        // https://stackoverflow.com/questions/10255724/incorrect-integer-2147483647-is-inserted-into-mysql
25
        $this->alterColumn(
26
            ObjectAssociation::tableName(),
27
            'objectId',
28
            Schema::TYPE_BIGINT
29
        );
30
    }
31
}
32