edit password_resets tables
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class ModifiyPasswordResetsForReceiverColumn extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('Receiver', function (Blueprint $table) {
|
||||
$table->unique('email');
|
||||
});
|
||||
Schema::table('password_resets_for_receiver', function (Blueprint $table) {
|
||||
$table->foreign('email', 'fk_password_resets_for_receiver_1')->references('email')->on('Receiver')->onUpdate('NO ACTION')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('password_resets_for_receiver', function (Blueprint $table) {
|
||||
$table->dropForeign('fk_password_resets_for_receiver_1');
|
||||
});
|
||||
Schema::table('Receiver', function (Blueprint $table) {
|
||||
$table->dropUnique('email');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class ModifiyPasswordResetsForCasebuilderColumn extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('CaseBuilder', function (Blueprint $table) {
|
||||
$table->unique('contactEmail');
|
||||
});
|
||||
Schema::table('password_resets_for_casebuilder', function (Blueprint $table) {
|
||||
$table->foreign('email', 'fk_password_resets_for_casebuilder_1')->references('contactEmail')->on('CaseBuilder')->onUpdate('NO ACTION')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('password_resets_for_casebuilder', function (Blueprint $table) {
|
||||
$table->dropForeign('fk_password_resets_for_casebuilder_1');
|
||||
});
|
||||
Schema::table('CaseBuilder', function (Blueprint $table) {
|
||||
$table->dropUnique('contactEmail');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class DropPasswordResetsForAdminTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('password_resets_for_admin');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::create('password_resets_for_admin', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user