db->fieldExists('version', 'exam_drafts')) { $fields['version'] = [ 'type' => 'INT', 'unsigned' => true, 'default' => 1, ]; } if (! $this->db->fieldExists('previous_draft_id', 'exam_drafts')) { $fields['previous_draft_id'] = [ 'type' => 'INT', 'unsigned' => true, 'null' => true, ]; } if ($fields !== []) { $this->forge->addColumn('exam_drafts', $fields); } } public function down() { $this->forge->dropColumn('exam_drafts', ['version', 'previous_draft_id']); } }