Skip to content

Conversation

artengin
Copy link
Contributor

@artengin artengin commented Sep 4, 2025

Refs: #68

@artengin artengin requested a review from DenTray September 4, 2025 16:59
@DenTray DenTray requested a review from Copilot September 8, 2025 06:05
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the CreateMediaTable migration to use Laravel's fluent foreignId methods instead of separate column definition and foreign key constraint declaration. This modernizes the migration code to follow Laravel's current best practices for defining foreign key relationships.

  • Replaced separate integer('owner_id') and foreign('owner_id') declarations with a single fluent foreignId('owner_id') chain
  • Moved the foreignId('preview_id') definition from column declaration to the foreign key constraint section and updated to use cascadeOnDelete()

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DenTray DenTray merged commit 969b383 into master Sep 8, 2025
3 checks passed
@DenTray DenTray deleted the migration-refactoring branch September 8, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants