-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/clean up code #395
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
Merged
zigzagdev
merged 9 commits into
chore/integrate-image_url-into-image-table
from
feat/clean-up-code
Mar 29, 2026
Merged
Feat/clean up code #395
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
483fe27
chore: remove image_url from QueryService & Command
zigzagdev 3814c75
Merge pull request #391 from zigzagdev/chore/remove-image_url-from-qs…
zigzagdev 1fb3883
chore: create new migration file
zigzagdev 85a9865
Merge pull request #393 from zigzagdev/feat/create-drop-migration-file
zigzagdev 8937ebd
fix: failed tests
zigzagdev 4a571c0
feat: drop redundant column
zigzagdev 71a3e0f
chore: delete redundant column from seeder
zigzagdev 7fb4385
fix: import key name
zigzagdev 8fe1569
Merge pull request #394 from zigzagdev/fix/delete-redundant-code
zigzagdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/database/migrations/2026_03_29_151147_drop_image_url_from_world_heritage_sites.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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('image_url'); | ||
| }); | ||
| } | ||
|
|
||
| /** | ||
| * Reverse the migrations. | ||
| */ | ||
| public function down(): void | ||
| { | ||
| Schema::table('world_heritage_sites', function (Blueprint $table) { | ||
| $table->string('image_url')->nullable()->after('short_description'); | ||
| }); | ||
| } | ||
| }; |
28 changes: 28 additions & 0 deletions
28
...atabase/migrations/2026_03_29_155722_drop_primary_image_url_from_world_heritage_sites.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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'); | ||
| }); | ||
| } | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
down()re-addsprimary_image_urlasstring()aftershort_description, but the column was originally created astext()(see 2025_12_31_163422_add_primary_image_url_to_world_heritage_table.php). Rolling back this migration would therefore not restore the original schema and could truncate longer URLs. Consider restoring it astext()->nullable()and (optionally) placing it afterimage_urlwhen that column exists (fallback to noafter()orafter('short_description')when it doesn’t).