db->tableExists('user_preferences')) { return; } if (! $this->db->fieldExists('hide_job_openings_popup', 'user_preferences')) { $definition = [ 'type' => 'TINYINT', 'constraint' => 1, 'default' => 0, 'null' => false, ]; if ($this->db->fieldExists('menu_custom_mode', 'user_preferences')) { $definition['after'] = 'menu_custom_mode'; } $this->forge->addColumn('user_preferences', [ 'hide_job_openings_popup' => $definition, ]); } } public function down() { if ( $this->db->tableExists('user_preferences') && $this->db->fieldExists('hide_job_openings_popup', 'user_preferences') ) { $this->forge->dropColumn('user_preferences', 'hide_job_openings_popup'); } } }