Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function up() |
||
14 | { |
||
15 | $this->createTable('media', [ |
||
16 | 'id' => $this->primaryKey(), |
||
17 | 'account_id' => $this->integer(), |
||
18 | 'shortcode' => $this->string()->notNull()->unique(), |
||
19 | 'is_video' => $this->boolean(), |
||
20 | 'caption' => $this->text(), |
||
21 | 'instagram_id' => $this->string(), |
||
22 | 'taken_at' => $this->dateTime(), |
||
23 | 'updated_at' => $this->dateTime(), |
||
24 | 'created_at' => $this->dateTime(), |
||
25 | 'monitoring' => $this->boolean()->notNull()->defaultValue(0), |
||
26 | ]); |
||
27 | |||
28 | $this->addForeignKey('fk_media_account', 'media', 'account_id', 'account', 'id', 'CASCADE'); |
||
29 | } |
||
40 |