recreate project
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class DropPrintRequestsForeignKey extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
// Drop the old foreign key if it exists
|
||||
$this->forge->dropForeignKey('print_requests', 'print_requests_class_id_foreign');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// Re-add the old foreign key
|
||||
$this->forge->addForeignKey('class_id', 'class_sections', 'id', 'CASCADE', 'CASCADE');
|
||||
|
||||
// Process the modifications
|
||||
$this->forge->processIndexes('print_requests');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user