1 | <?php |
||||
2 | |||||
3 | use yii\db\Migration; |
||||
4 | |||||
5 | /** |
||||
6 | * Handles the creation of table `owners_mediafiles`. |
||||
7 | */ |
||||
8 | class m180220_082806_create_owners_mediafiles_table extends Migration |
||||
9 | { |
||||
10 | /** |
||||
11 | * {@inheritdoc} |
||||
12 | */ |
||||
13 | public function safeUp() |
||||
14 | { |
||||
15 | $this->createTable('owners_mediafiles', [ |
||||
16 | 'mediafileId' => $this->integer()->notNull(), |
||||
0 ignored issues
–
show
Bug
introduced
by
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_082806_create_owners_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
Loading history...
|
|||||
19 | 'ownerAttribute' => $this->string(64)->notNull(), |
||||
20 | 'PRIMARY KEY (`mediafileId`, `ownerId`, `owner`, `ownerAttribute`)', |
||||
21 | ]); |
||||
22 | } |
||||
23 | |||||
24 | /** |
||||
25 | * {@inheritdoc} |
||||
26 | */ |
||||
27 | public function safeDown() |
||||
28 | { |
||||
29 | $this->dropTable('owners_mediafiles'); |
||||
30 | } |
||||
31 | } |
||||
32 |