m161226_105932_creative_role.php
1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
use yii\db\Migration;
class m161226_105932_creative_role extends Migration
{
public function up()
{
$this->createTable(
'creative_role',
[
'id' => $this->primaryKey(),
'intellectual_property_id' => $this->integer(),
'title' => $this->string(255),
'name' => $this->string(255),
'part' => $this->double(),
'code' => $this->string(255),
'iri' => $this->string(255),
'society' => $this->string(255),
]
);
$this->addForeignKey(
'creative_role_fk',
'creative_role',
'intellectual_property_id',
'intellectual_property',
'id',
'CASCADE',
'CASCADE'
);
}
public function down()
{
$this->dropForeignKey('creative_role_fk',
'creative_role');
$this->dropTable('creative_role');
}
}