Issues (46)

m180220_082911_create_owners_albums_table.php (2 issues)

Labels
Severity
1
<?php
2
3
use yii\db\Migration;
4
5
/**
6
 * Handles the creation of table `owners_albums`.
7
 */
8
class m180220_082911_create_owners_albums_table extends Migration
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function safeUp()
14
    {
15
        $this->createTable('owners_albums', [
16
            'albumId' => $this->integer()->notNull(),
0 ignored issues
show
The method integer() does not exist on m180220_082911_create_owners_albums_table. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
            'albumId' => $this->/** @scrutinizer ignore-call */ integer()->notNull(),
Loading history...
17
            'ownerId' => $this->integer()->notNull(),
18
            'owner' => $this->string(64)->notNull(),
0 ignored issues
show
The method string() does not exist on m180220_082911_create_owners_albums_table. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
            'owner' => $this->/** @scrutinizer ignore-call */ string(64)->notNull(),
Loading history...
19
            'ownerAttribute' => $this->string(64)->notNull(),
20
            'PRIMARY KEY (`albumId`, `ownerId`, `owner`, `ownerAttribute`)',
21
        ]);
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function safeDown()
28
    {
29
        $this->dropTable('owners_albums');
30
    }
31
}
32