1 | <?php |
||||
2 | |||||
3 | use yii\db\Migration; |
||||
4 | |||||
5 | /** |
||||
6 | * Handles the creation of table `albums`. |
||||
7 | */ |
||||
8 | class m180220_083639_create_albums_table extends Migration |
||||
9 | { |
||||
10 | /** |
||||
11 | * {@inheritdoc} |
||||
12 | */ |
||||
13 | public function safeUp() |
||||
14 | { |
||||
15 | $this->createTable('albums', [ |
||||
16 | 'id' => $this->primaryKey(), |
||||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
17 | 'title' => $this->string(64)->notNull(), |
||||
0 ignored issues
–
show
The method
string() does not exist on m180220_083639_create_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
Loading history...
|
|||||
18 | 'description' => $this->text(), |
||||
0 ignored issues
–
show
The method
text() does not exist on m180220_083639_create_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
Loading history...
|
|||||
19 | 'type' => $this->string(64)->notNull(), |
||||
20 | 'created_at' => $this->integer()->notNull(), |
||||
0 ignored issues
–
show
The method
integer() does not exist on m180220_083639_create_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
Loading history...
|
|||||
21 | 'updated_at' => $this->integer(), |
||||
22 | ]); |
||||
23 | } |
||||
24 | |||||
25 | /** |
||||
26 | * {@inheritdoc} |
||||
27 | */ |
||||
28 | public function safeDown() |
||||
29 | { |
||||
30 | $this->dropTable('albums'); |
||||
31 | } |
||||
32 | } |
||||
33 |