Add profile avatar uploads
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?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('users', function (Blueprint $table): void {
|
||||
$table->string('avatar_path')
|
||||
->nullable()
|
||||
->after('password');
|
||||
$table->string('avatar_color', 7)
|
||||
->nullable()
|
||||
->after('avatar_path');
|
||||
$table->boolean('avatar_is_generated')
|
||||
->default(false)
|
||||
->after('avatar_color');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->dropColumn([
|
||||
'avatar_path',
|
||||
'avatar_color',
|
||||
'avatar_is_generated',
|
||||
]);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user