-
Notifications
You must be signed in to change notification settings - Fork 0
feat: migrate image storage from image_url field to world_heritage_site_images table #396
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
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
08e3cb1
chore: world_heritage-split-command-refactor
zigzagdev 22f12dc
Merge pull request #386 from zigzagdev/chore/delete-command-writing-i…
zigzagdev 9cd28c8
refactor: remove thumbnail relation and image_url from WorldHeritage …
zigzagdev d152539
fix: replace image_url/thumbnail with images relation in WorldHeritag…
zigzagdev 41b8ab1
refactor: update WorldHeritageQueryServiceInterface
zigzagdev a92eff3
Merge pull request #387 from zigzagdev/fix/api-detail-layout
zigzagdev edb5fa1
feat: add Eloquent cast into ImageModel
zigzagdev 1ec6ad6
fix: test content add
zigzagdev 9dcfd6d
Merge pull request #388 from zigzagdev/chore/image_url-queryservice-t…
zigzagdev 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 7c42616
Merge pull request #395 from zigzagdev/feat/clean-up-code
zigzagdev 03a13ca
fix: apply copilot review suggestions
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,6 @@ | |
| namespace App\Models; | ||
|
|
||
| use Illuminate\Database\Eloquent\Model; | ||
| use Illuminate\Database\Eloquent\SoftDeletes; | ||
|
|
||
| class Image extends Model | ||
| { | ||
|
|
@@ -23,6 +22,13 @@ class Image extends Model | |
| 'updated_at', | ||
| ]; | ||
|
|
||
| public function casts(): array | ||
| { | ||
| return [ | ||
| 'is_primary' => 'boolean', | ||
| ]; | ||
| } | ||
|
Comment on lines
+25
to
+30
|
||
|
|
||
| public function worldHeritage() | ||
| { | ||
| return $this->belongsTo(WorldHeritage::class, 'world_heritage_site_id', 'id'); | ||
|
|
||
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.
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.
The default value for
$extrais split across lines (array $extra =then[]). This is valid PHP but inconsistent with the surrounding formatting and will likely be rewritten by Pint; please format it as a single parameter line (array $extra = []) or use a standard multiline style.