Created
April 28, 2023 01:21
-
-
Save aldhinya/6ecb3056b759ae1b08b6ddfcbc720d85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
return new class extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* | |
* @return void | |
*/ | |
public function up() | |
{ | |
if (! Schema::hasTable('v1_mapping_platform_store')) { | |
Schema::create('v1_mapping_platform_store', function (Blueprint $table) { | |
$table->bigIncrements('id'); | |
$table->foreignId('platform_id')->constrained('v0_platforms', 'id'); | |
$table->foreignId('store_id')->constrained('v0_stores', 'id'); | |
$table->string("name"); | |
}); | |
} | |
} | |
/** | |
* Reverse the migrations. | |
* | |
* @return void | |
*/ | |
public function down() | |
{ | |
Schema::dropIfExists('v1_mapping_platform_store'); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment