| Total Complexity | 3 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class m16_add_block_view_field extends \phpbb\db\migration\migration |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @inheritdoc |
||
| 19 | */ |
||
| 20 | public static function depends_on() |
||
| 21 | { |
||
| 22 | return array( |
||
| 23 | '\blitze\sitemaker\migrations\v20x\m1_initial_schema', |
||
| 24 | ); |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Update the sm_blocks schema |
||
| 29 | * |
||
| 30 | * @return array Array of table schema |
||
| 31 | * @access public |
||
| 32 | */ |
||
| 33 | public function update_schema() |
||
| 34 | { |
||
| 35 | return array( |
||
| 36 | 'drop_columns' => array( |
||
| 37 | $this->table_prefix . 'sm_blocks' => array( |
||
| 38 | 'no_wrap', |
||
| 39 | ), |
||
| 40 | ), |
||
| 41 | 'add_columns' => array( |
||
| 42 | $this->table_prefix . 'sm_blocks' => array( |
||
| 43 | 'view' => array('VCHAR:55', ''), |
||
| 44 | ), |
||
| 45 | ), |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @inheritdoc |
||
| 51 | */ |
||
| 52 | public function revert_schema() |
||
| 53 | { |
||
| 54 | return array( |
||
| 55 | 'add_columns' => array( |
||
| 56 | $this->table_prefix . 'sm_blocks' => array( |
||
| 57 | 'no_wrap' => array('BOOL', 0), |
||
| 58 | ), |
||
| 59 | ), |
||
| 60 | 'drop_columns' => array( |
||
| 61 | $this->table_prefix . 'sm_blocks' => array( |
||
| 62 | 'view', |
||
| 63 | ), |
||
| 68 |