Remove unused MorphToMany relationships from models and add CategoriesTableSeeder for category data population
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?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('user_addresses', function (Blueprint $table) {
|
||||
$table->string('title')->nullable();
|
||||
$table->string('building')->nullable();
|
||||
$table->string('floor')->nullable();
|
||||
$table->string('door')->nullable();
|
||||
$table->string('location')->nullable();
|
||||
|
||||
$table->dropColumn('first_name');
|
||||
$table->dropColumn('last_name');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('user_addresses', function (Blueprint $table) {
|
||||
$table->dropColumn('title');
|
||||
$table->dropColumn('building');
|
||||
$table->dropColumn('floor');
|
||||
$table->dropColumn('door');
|
||||
$table->dropColumn('location');
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user