fix enrollment logic, add financial aid, fix class distribution
Tests / PHPUnit (push) Failing after 1m6s
Tests / PHPUnit (push) Failing after 1m6s
This commit is contained in:
@@ -20,6 +20,16 @@ class FixPrintRequestsForeignKeyAgain extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
$orphanCount = (int) $db->table('print_requests pr')
|
||||
->join('classSection cs', 'cs.class_id = pr.class_id', 'left')
|
||||
->where('pr.class_id IS NOT NULL', null, false)
|
||||
->where('cs.class_id IS NULL', null, false)
|
||||
->countAllResults();
|
||||
|
||||
if ($orphanCount > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->forge->addForeignKey('class_id', 'classSection', 'class_id', 'CASCADE', 'CASCADE');
|
||||
$this->forge->processIndexes('print_requests');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user