customer section
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
|
||||
// status: active / inactive
|
||||
$table->enum('status', ['active', 'inactive'])->default('active')->after('pincode');
|
||||
|
||||
// premium / regular
|
||||
$table->enum('customer_type', ['regular', 'premium'])->default('regular')->after('status');
|
||||
|
||||
// optional: profile image path
|
||||
$table->string('profile_image')->nullable()->after('customer_type');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn(['status', 'customer_type', 'profile_image']);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user