Skip to content

Master -> dev#90

Open
kkartunov wants to merge 14 commits intodevelopfrom
master
Open

Master -> dev#90
kkartunov wants to merge 14 commits intodevelopfrom
master

Conversation

@kkartunov
Copy link
Contributor

No description provided.

@kkartunov kkartunov requested a review from jmgasper March 2, 2026 07:18

echo "Running Prisma migrations..."

if [ -z "$DATABASE_URL" ]; then
Copy link

Choose a reason for hiding this comment

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

[❗❗ correctness]
Consider using -z "$DATABASE_URL" to check if DATABASE_URL is unset or empty. This ensures that the script behaves correctly even if DATABASE_URL is set but empty.

# Optional: print sanitized env vars to help debug
# env | grep -v "PASSWORD\|SECRET\|KEY\|TOKEN"
else
echo "DATABASE_URL is present (length: ${#DATABASE_URL})"
Copy link

Choose a reason for hiding this comment

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

[⚠️ security]
Printing the length of DATABASE_URL might not be necessary and could expose sensitive information about the environment setup. Consider removing this line or ensuring it doesn't inadvertently leak information.

ALTER TABLE "members"."memberStats"
ALTER COLUMN "trackId" SET NOT NULL,
ALTER COLUMN "typeId" SET NOT NULL;
-- -- ValidateBackfillPrerequisites
Copy link

Choose a reason for hiding this comment

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

[⚠️ maintainability]
The entire backfill logic has been commented out. Ensure that this is intentional and that the backfill is no longer required. If this logic is still needed, consider moving it to a separate migration or script to maintain clarity and separation of concerns.

-- WHERE ms."trackId" IS NULL OR ms."typeId" IS NULL;

-- -- AlterTable
-- ALTER TABLE "members"."memberStats"
Copy link

Choose a reason for hiding this comment

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

[❗❗ correctness]
The ALTER TABLE statements to set trackId and typeId as NOT NULL are commented out. Ensure that these constraints are no longer necessary. If they are needed for data integrity, consider re-enabling them or handling them in a different way.

userId BigInt
trackId String
typeId String
trackId String?
Copy link

Choose a reason for hiding this comment

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

[❗❗ correctness]
Changing trackId from String to String? makes it nullable. Ensure that the application logic correctly handles cases where trackId is null, as this could impact data integrity or application behavior.

trackId String
typeId String
trackId String?
typeId String?
Copy link

Choose a reason for hiding this comment

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

[❗❗ correctness]
Changing typeId from String to String? makes it nullable. Verify that all parts of the application that rely on typeId can handle null values appropriately to prevent potential errors or unexpected behavior.

@kkartunov
Copy link
Contributor Author

@jmgasper shall we sync dev with master? Want to keep things in sync...

[PROD RELEASE] - Updates & fixes
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