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

🗃️ Add id_linked_user to tcg_collections table #343

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/api/scripts/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ CREATE TABLE tcg_collections
parent_collection uuid NULL,
created_at timestamp NOT NULL,
modified_at timestamp NOT NULL,
id_linked_user uuid NOT NULL,
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The search did not reveal any migration scripts or application logic updates related to handling existing 'tcg_collections' records and new inserts with the addition of the 'id_linked_user' column. This suggests a potential oversight in ensuring that existing records are updated and new inserts include the necessary 'id_linked_user' value. It's recommended to verify the presence of these critical updates manually to avoid data integrity issues.

Analysis chain

The addition of the id_linked_user column with a NOT NULL constraint to the tcg_collections table is a significant change. Ensure that:

  • Existing records in the tcg_collections table are updated to include a valid id_linked_user value before this schema change is applied.
  • Application logic that inserts new records into the tcg_collections table is updated to include an id_linked_user value.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that migration scripts or application logic updates are in place for handling existing data.
# This is a conceptual script; specific implementation details will vary.
echo "Check for migration scripts or application updates that handle existing 'tcg_collections' records and new inserts."

Length of output: 244



Script:

#!/bin/bash
# Search for migration scripts related to 'tcg_collections' table updates.
echo "Searching for migration scripts..."
rg "tcg_collections" --files-with-matches | grep -i "migration"

# Search for application logic updates related to 'tcg_collections' table inserts.
echo "Searching for application logic updates..."
rg "tcg_collections" --files-with-matches | grep -i "insert"

Length of output: 294

CONSTRAINT PK_tcg_collections PRIMARY KEY ( id_tcg_collection )
);

Expand Down
Loading