Issues (46)

m180220_081105_create_mediafiles_table.php (4 issues)

Labels
Severity
1
<?php
2
3
use yii\db\Migration;
4
5
/**
6
 * Handles the creation of table `mediafiles`.
7
 */
8
class m180220_081105_create_mediafiles_table extends Migration
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function safeUp()
14
    {
15
        $this->createTable('mediafiles', [
16
            'id' => $this->primaryKey(),
0 ignored issues
show
The method primaryKey() does not exist on m180220_081105_create_mediafiles_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
            'id' => $this->/** @scrutinizer ignore-call */ primaryKey(),
Loading history...
17
            'filename' => $this->string(128)->notNull(),
0 ignored issues
show
The method string() does not exist on m180220_081105_create_mediafiles_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

17
            'filename' => $this->/** @scrutinizer ignore-call */ string(128)->notNull(),
Loading history...
18
            'type' => $this->string(64)->notNull(),
19
            'url' => $this->text()->notNull(),
0 ignored issues
show
The method text() does not exist on m180220_081105_create_mediafiles_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

19
            'url' => $this->/** @scrutinizer ignore-call */ text()->notNull(),
Loading history...
20
            'alt' => $this->string(128),
21
            'size' => $this->integer()->notNull(),
0 ignored issues
show
The method integer() does not exist on m180220_081105_create_mediafiles_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

21
            'size' => $this->/** @scrutinizer ignore-call */ integer()->notNull(),
Loading history...
22
            'title' => $this->string(128),
23
            'description' => $this->text(),
24
            'thumbs' => $this->text(),
25
            'storage' => $this->string(12)->notNull(),
26
            'created_at' => $this->integer()->notNull(),
27
            'updated_at' => $this->integer(),
28
        ]);
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function safeDown()
35
    {
36
        $this->dropTable('mediafiles');
37
    }
38
}
39