| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class m180824_090744_create_notification_table extends Migration |
||
| 11 | { |
||
| 12 | public function up() |
||
| 13 | { |
||
| 14 | $this->createTable('notification', [ |
||
| 15 | 'id' => $this->primaryKey(), |
||
| 16 | 'level' => $this->string(), |
||
| 17 | 'notifiable_type' => $this->string(), |
||
| 18 | 'notifiable_id' => $this->integer()->unsigned(), |
||
| 19 | 'subject' => $this->string(), |
||
| 20 | 'body' => $this->text(), |
||
| 21 | 'read_at' => $this->timestamp()->null(), |
||
| 22 | 'created_at' => $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'), |
||
| 23 | 'updated_at' => $this->timestamp()->null(), |
||
| 24 | ]); |
||
| 25 | $this->createIndex('notifiable', 'notification', ['notifiable_type', 'notifiable_id']); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function down() |
||
| 32 | } |
||
| 33 | |||
| 34 | } |