hasTable('scad_deadlines')) { throw new RuntimeException('Table scad_deadlines does not exist.'); } $table = $this->table('scad_deadlines'); if (!$table->hasColumn('notify_function')) { $table ->addColumn('notify_function', 'boolean', [ 'null' => false, 'default' => false, 'after' => 'function_id', 'comment' => 'Send deadline reminder also to the linked function email', ]) ->update(); } } public function down(): void { if (!$this->hasTable('scad_deadlines')) { return; } $table = $this->table('scad_deadlines'); if ($table->hasColumn('notify_function')) { $table ->removeColumn('notify_function') ->update(); } } }