This commit is contained in:
@@ -8,6 +8,10 @@ class AddClassSectionToEventCharges extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if (! $this->db->tableExists('event_charges')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$fields = [
|
||||
'class_section_id' => [
|
||||
'type' => 'INT',
|
||||
@@ -25,7 +29,7 @@ class AddClassSectionToEventCharges extends Migration
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->fieldExists('class_section_id', 'event_charges')) {
|
||||
if ($this->db->tableExists('event_charges') && $this->db->fieldExists('class_section_id', 'event_charges')) {
|
||||
$this->forge->dropColumn('event_charges', 'class_section_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user