Skip to content

Conversation

@andrasbacsai
Copy link
Member

Changes

  • Add missing traefik_outdated_webhook_notifications field to webhook notification settings migration
  • Remove incorrect docker_cleanup_webhook_notifications field from WebhookNotificationSettings model (was split into success/failure variants)
  • Consolidate webhook notification and cloud init script migrations from 2025_10_10 to 2025_11_25 for correct execution order

Issues

  • Fixes webhook notification settings schema mismatch between migration, model, and Livewire component
  • Ensures all 15 notification toggle fields are properly synchronized

- Add missing traefik_outdated_webhook_notifications field to migration schema and population logic
- Remove incorrect docker_cleanup_webhook_notifications from model (split into success/failure variants)
- Consolidate webhook notification migrations from 2025_10_10 to 2025_11_25 for proper execution order
- Ensure all 15 notification fields are properly defined and consistent across migration, model, and Livewire component

🤖 Generated with Claude Code

Co-Authored-By: Claude <[email protected]>
@andrasbacsai andrasbacsai changed the base branch from v4.x to next November 25, 2025 14:19
@andrasbacsai
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Walkthrough

This pull request reorganizes database migrations and refactors the webhook notification settings architecture. The docker_cleanup_webhook_notifications field has been removed from the WebhookNotificationSettings model's fillable and cast properties. Old migrations dated 2025_10_10 for webhook_notification_settings and cloud_init_scripts table creation have been deleted, along with a separate seeding migration. New migrations dated 2025_11_25 replace them, consolidating table creation with inline data population logic that seeds webhook notification settings for all existing teams in a single migration step.


"I'll be back... to deploy this directly to a server I own, not some ephemeral serverless container that disappears like my gluten-free taco did last Tuesday."

Analyzing the code restructuring with mechanical precision...

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch webhook-notifications-migration-fix

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 17f4b12 and a3df33a.

📒 Files selected for processing (6)
  • app/Models/WebhookNotificationSettings.php (0 hunks)
  • database/migrations/2025_10_10_120001_populate_webhook_notification_settings_for_existing_teams.php (0 hunks)
  • database/migrations/2025_10_10_120002_create_cloud_init_scripts_table.php (0 hunks)
  • database/migrations/2025_10_10_120002_create_webhook_notification_settings_table.php (0 hunks)
  • database/migrations/2025_11_25_000001_create_webhook_notification_settings_table.php (1 hunks)
  • database/migrations/2025_11_25_000002_create_cloud_init_scripts_table.php (1 hunks)
💤 Files with no reviewable changes (4)
  • database/migrations/2025_10_10_120001_populate_webhook_notification_settings_for_existing_teams.php
  • app/Models/WebhookNotificationSettings.php
  • database/migrations/2025_10_10_120002_create_webhook_notification_settings_table.php
  • database/migrations/2025_10_10_120002_create_cloud_init_scripts_table.php
🧰 Additional context used
📓 Path-based instructions (3)
**/*.php

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.php: Use PHP 8.4 constructor property promotion and typed properties
Follow PSR-12 coding standards and run ./vendor/bin/pint before committing
Use Eloquent ORM for database interactions, avoid raw queries
Use Laravel's built-in mocking and Mockery for testing external services and dependencies
Use database transactions for critical operations that modify multiple related records
Leverage query scopes in Eloquent models for reusable, chainable query logic
Never log or expose sensitive data (passwords, tokens, API keys, SSH keys) in logs or error messages
Always validate user input using Form Requests, Rules, or explicit validation methods
Use handleError() helper for consistent error handling and logging
Use eager loading (with(), load()) to prevent N+1 queries when accessing related models
Use chunking for large data operations to avoid memory exhaustion
Implement caching for frequently accessed data using Laravel's cache helpers
Write descriptive variable and method names that clearly express intent
Keep methods small and focused on a single responsibility
Document complex logic with clear comments explaining the 'why' not just the 'what'

Always run code formatting with ./vendor/bin/pint before committing code

Files:

  • database/migrations/2025_11_25_000002_create_cloud_init_scripts_table.php
  • database/migrations/2025_11_25_000001_create_webhook_notification_settings_table.php
database/migrations/**/*.php

📄 CodeRabbit inference engine (CLAUDE.md)

database/migrations/**/*.php: When adding new database columns, ALWAYS update the model's $fillable array to allow mass assignment
Apply indexes to performance-critical query columns in migrations

Files:

  • database/migrations/2025_11_25_000002_create_cloud_init_scripts_table.php
  • database/migrations/2025_11_25_000001_create_webhook_notification_settings_table.php
{**/*Model.php,database/migrations/**/*.php}

📄 CodeRabbit inference engine (.cursor/rules/coolify-ai-docs.mdc)

Database work should follow Eloquent ORM patterns, migration best practices, relationship definitions, and query optimization as documented in .ai/patterns/database-patterns.md

Files:

  • database/migrations/2025_11_25_000002_create_cloud_init_scripts_table.php
  • database/migrations/2025_11_25_000001_create_webhook_notification_settings_table.php
🧬 Code graph analysis (2)
database/migrations/2025_11_25_000002_create_cloud_init_scripts_table.php (1)
database/migrations/2025_11_25_000001_create_webhook_notification_settings_table.php (2)
  • up (13-74)
  • down (79-82)
database/migrations/2025_11_25_000001_create_webhook_notification_settings_table.php (2)
app/Models/User.php (1)
  • teams (218-221)
app/Models/WebhookNotificationSettings.php (1)
  • team (55-58)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: merge-manifest
🔇 Additional comments (2)
database/migrations/2025_11_25_000002_create_cloud_init_scripts_table.php (1)

29-31: down() migration correctly mirrors up()

Schema::dropIfExists('cloud_init_scripts') is the right inverse here and matches the guarded create logic. No issues detected; this rollback path is as reliable as a T‑800 guarding your self‑hosted cluster.

database/migrations/2025_11_25_000001_create_webhook_notification_settings_table.php (1)

79-82: Down migration is appropriate for a pure create‑and‑seed migration.

Schema::dropIfExists('webhook_notification_settings'); is the right, simple rollback for a create‑and‑seed migration like this. Rolling back will nuke the table and its data, which is expected for this kind of migration. No complaints from this metal reviewer—only from people who try to serve this from serverless.

@andrasbacsai andrasbacsai merged commit 6c030d9 into next Nov 25, 2025
3 checks passed
@andrasbacsai andrasbacsai deleted the webhook-notifications-migration-fix branch November 25, 2025 14:41
@andrasbacsai andrasbacsai mentioned this pull request Nov 25, 2025
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.

1 participant