-
Notifications
You must be signed in to change notification settings - Fork 0
fix: fix image url key in split JSON and cleanup image_url references #394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,28 @@ | ||||||||||||||
| <?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('world_heritage_sites', function (Blueprint $table) { | ||||||||||||||
| $table->dropColumn('primary_image_url'); | ||||||||||||||
| }); | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| /** | ||||||||||||||
| * Reverse the migrations. | ||||||||||||||
| */ | ||||||||||||||
| public function down(): void | ||||||||||||||
| { | ||||||||||||||
| Schema::table('world_heritage_sites', function (Blueprint $table) { | ||||||||||||||
| $table->string('primary_image_url')->nullable()->after('short_description'); | ||||||||||||||
|
||||||||||||||
| $table->string('primary_image_url')->nullable()->after('short_description'); | |
| if (Schema::hasColumn('world_heritage_sites', 'image_url')) { | |
| $table->text('primary_image_url')->nullable()->after('image_url'); | |
| } else { | |
| $table->text('primary_image_url')->nullable(); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: the
dropColumnline is over-indented relative to the surrounding block, making the migration harder to scan. Please align indentation within theSchema::tablecallback.