fix batch issue
This commit is contained in:
@@ -8,6 +8,10 @@ class AddBatchNumberToReimbursements extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if (! $this->db->tableExists('reimbursements') || $this->db->fieldExists('batch_number', 'reimbursements')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$fields = [
|
||||
'batch_number' => [
|
||||
'type' => 'INT',
|
||||
@@ -24,7 +28,8 @@ class AddBatchNumberToReimbursements extends Migration
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropColumn('reimbursements', 'batch_number');
|
||||
if ($this->db->tableExists('reimbursements') && $this->db->fieldExists('batch_number', 'reimbursements')) {
|
||||
$this->forge->dropColumn('reimbursements', 'batch_number');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user