| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | public function change(): void |
||
| 23 | { |
||
| 24 | $table = $this->table('media-properties'); |
||
| 25 | |||
| 26 | $table->addColumn('model', 'string'); |
||
| 27 | $table->addColumn('model_id', 'biginteger'); |
||
| 28 | $table->addColumn('collection_name', 'string'); |
||
| 29 | |||
| 30 | $table->addColumn('custom_properties', 'json'); |
||
| 31 | |||
| 32 | $table->addIndex(['model']); |
||
| 33 | $table->addIndex(['model_id']); |
||
| 34 | $table->addIndex(['collection_name']); |
||
| 35 | $table->addIndex(['model', 'model_id', 'collection_name'], ['unique' => true]); |
||
| 36 | |||
| 37 | $table->save(); |
||
| 38 | |||
| 39 | $table->changeColumn('id', 'biginteger', ['identity' => true]); |
||
| 40 | $table->save(); |
||
| 41 | } |
||
| 43 |