Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar1862000 committed Dec 12, 2024
1 parent 7a2bb34 commit b98ade0
Showing 1 changed file with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
// use Illuminate\Database\Migrations\Migration;
// use Illuminate\Database\Schema\Blueprint;
// use Illuminate\Support\Facades\Schema;

class RemoveCentreIdFromCodeTrekApplicants extends Migration
{
// class RemoveCentreIdFromCodeTrekApplicants extends Migration
// {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('code_trek_applicants', function (Blueprint $table) {
$table->dropForeign(['centre_id']); // Drops the foreign key constraint
$table->dropColumn('centre_id'); // Drops the column
});
}
// public function up()
// {
// Schema::table('code_trek_applicants', function (Blueprint $table) {
// $table->dropForeign(['centre_id']); // Drops the foreign key constraint
// $table->dropColumn('centre_id'); // Drops the column
// });
// }

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('code_trek_applicants', function (Blueprint $table) {
$table->unsignedBigInteger('centre_id')->nullable();
$table->foreign('centre_id')->references('id')->on('office_locations');
});
}
}
// public function down()
// {
// Schema::table('code_trek_applicants', function (Blueprint $table) {
// $table->unsignedBigInteger('centre_id')->nullable();
// $table->foreign('centre_id')->references('id')->on('office_locations');
// });
// }
// }

0 comments on commit b98ade0

Please sign in to comment.