Skip to content

Replace updateOrCreate with firstOrCreate in AnnouncementsDatabaseSeeder - #5

Merged
roble merged 1 commit into
mainfrom
dev
Mar 18, 2026
Merged

Replace updateOrCreate with firstOrCreate in AnnouncementsDatabaseSeeder#5
roble merged 1 commit into
mainfrom
dev

Conversation

@roble

@roble roble commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

This pull request makes a minor change to the AnnouncementsDatabaseSeeder class to improve how the initial announcement record is seeded in the database. The update replaces the updateOrCreate method with firstOrCreate, which ensures the announcement is only created if it doesn't already exist, without updating existing records.

Copilot AI review requested due to automatic review settings March 18, 2026 19:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adjusts the announcements module’s database seeding behavior so the initial “module is live” banner is created only when missing, and existing announcements are not modified during seeding.

Changes:

  • Replace Announcement::updateOrCreate(...) with Announcement::firstOrCreate(...) in the announcements seeder to avoid updating existing rows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@roble
roble merged commit 92ec2c2 into main Mar 18, 2026
6 checks passed
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