migrate to gtea from bistbucket
This commit is contained in:
0
Modules/WarehouseAddon/Database/Seeders/.gitkeep
Normal file
0
Modules/WarehouseAddon/Database/Seeders/.gitkeep
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('warehouses', function (Blueprint $table) {
|
||||
$table->dropUnique('warehouses_email_unique');
|
||||
$table->string('email')->nullable()->change();
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('warehouses', function (Blueprint $table) {
|
||||
$table->string('email')->unique()->nullable()->change();
|
||||
$table->dropColumn('branch_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user