Skip to content

Conversation

@abielzulio
Copy link
Collaborator

No description provided.

@abielzulio abielzulio requested a review from Copilot March 30, 2025 14:54
Copy link

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 adds a migration to update the foreign key constraints for the schedule table.

  • Enforces non-nullability on station_origin_id
  • Changes the onDelete behavior for station_origin_id from "set null" to "cascade"
Files not reviewed (3)
  • drizzle/migrations/0008_wooden_purple_man.sql: Language not supported
  • drizzle/migrations/meta/0008_snapshot.json: Language not supported
  • drizzle/migrations/meta/_journal.json: Language not supported
Comments suppressed due to low confidence (2)

src/db/schema/schedule.table.ts:34

  • Verify that enforcing .notNull() on station_origin_id is intended given that station_destination_id remains nullable. Ensure that this change aligns with the expected business logic.
.notNull()

src/db/schema/schedule.table.ts:36

  • Changing the onDelete behavior from 'set null' to 'cascade' can lead to unintended cascading deletions. Confirm that this change is in line with the overall referential integrity requirements.
onDelete: "cascade"

@abielzulio abielzulio merged commit ca6f765 into main Mar 30, 2025
1 check 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