Skip to content
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

Fix: Check if junction table exists before creation #2277 #2279

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

khushalmajoka
Copy link

This pull request addresses the issue #2277, where the createJunctionTable function in utils.ts does not check if a table already exists before attempting to create it. The following changes have been made:

  • Table Existence Check: Added a check to ensure the junction table does not already exist before creating it. This prevents potential errors when the table already exists.
  • Optional Indexing: Implemented optional indexing on the primary keys for larger tables to improve query performance.
  • Improved Error Handling: Enhanced error handling in the dropOnUpdateTrigger, createOnUpdateTrigger, dropUpdatedAtTriggerFunction, and createUpdateAtTriggerFunction functions for better debugging and maintenance.

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