add set media migration
This commit is contained in:
parent
fa8efd765f
commit
0aeeed6f2e
2 changed files with 33 additions and 2 deletions
|
|
@ -11,8 +11,6 @@ return new class extends Migration
|
||||||
Schema::create('sets', function (Blueprint $table) {
|
Schema::create('sets', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->text('description');
|
|
||||||
$table->string('icon_image_url');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('sets', function (Blueprint $table) {
|
||||||
|
$table->text('description')->default('');
|
||||||
|
$table->string('icon_image_url')->default('');
|
||||||
|
});
|
||||||
|
|
||||||
|
DB::table('sets')
|
||||||
|
->where('name', 'Baderech HaAvodah')
|
||||||
|
->update([
|
||||||
|
'description' => 'Baderech HaAvodah is a way of living - '
|
||||||
|
. 'a structured path for inner and outer growth, '
|
||||||
|
. 'spiritual refinement, and personal development.',
|
||||||
|
'icon_image_url' => '/assets/baderech-haavodah-icon.svg',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('sets', function (Blueprint $table) {
|
||||||
|
$table->dropColumn(['description', 'icon_image_url']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue