Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class AddForeiginToProcurements extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::table('procurements', function (Blueprint $table) {
- $table->dropForeign(['ItemId']);
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::table('procurements', function (Blueprint $table) {
- $table->foreign('ItemId')->references('Id')->on('inventory_branches')->onDelete('cascade');
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement