Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Master -> develop sync#40

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kkartunov merged 6 commits intodevelopfrommaster
Nov 11, 2025
Merged

Master -> develop sync#40

kkartunov merged 6 commits intodevelopfrommaster
Nov 11, 2025

Conversation

@kkartunov
Copy link
Contributor

No description provided.

CREATESCHEMAIF NOT EXISTS reviews;

CREATE EXTENSION IF NOT EXISTS fuzzystrmatch WITH SCHEMA skills;
CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA pg_catalog;

Choose a reason for hiding this comment

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

[⚠️design]
Thepg_trgm extension is being created in thepg_catalog schema. Typically, extensions are created in thepublic schema or a specific schema relevant to the application. Ensure that this is intentional and that the application logic accounts for this schema placement.

CREATE EXTENSION IF NOT EXISTS fuzzystrmatch WITH SCHEMA skills;
CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA pg_catalog;
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA reviews;
CREATE EXTENSION IF NOT EXISTS"uuid-ossp" WITH SCHEMA skills;

Choose a reason for hiding this comment

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

[⚠️design]
Theuuid-ossp extension is being created in theskills schema. This is unusual as extensions are often placed in thepublic schema. Verify that this schema choice is deliberate and that it aligns with the application's schema management strategy.

JOIN pg_namespace nsONns.oid=idx.relnamespace
WHEREidx.relname='challenge_phase_challenge_open_end_idx'
ANDns.nspname= challenge_phase_schema
AND pg_get_indexdef(idx.oid)LIKE'%("challengeId", "isOpen", "scheduledEndDate", "actualEndDate", name)%'

Choose a reason for hiding this comment

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

[⚠️maintainability]
Thepg_get_indexdef function is used with aLIKE clause to check index definitions. This approach can be fragile if the index definition changes in ways not accounted for by theLIKE pattern. Consider using a more robust method to verify index structure, if possible.

@@ -0,0 +1,30 @@
-- View to use in performance updates (PM-2206)
DROPVIEW IF EXISTS"challenges"."MemberChallengeAccess";

Choose a reason for hiding this comment

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

[❗❗correctness]
Dropping the view without checking if it exists first could lead to errors if the view is not present. Consider usingDROP VIEW IF EXISTS to avoid potential errors.

) THEN
EXECUTE format(
'CREATE VIEW %I.%I AS
SELECT DISTINCT r."challengeId", r."memberId"

Choose a reason for hiding this comment

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

[⚠️performance]
UsingSELECT DISTINCT can be resource-intensive. Ensure that this is necessary for the use case, as it may impact performance.

'CREATE VIEW %I.%I AS
SELECT DISTINCT r."challengeId", r."memberId"
FROM resources."Resource" r
WHERE r."challengeId" IS NOT NULL

Choose a reason for hiding this comment

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

[⚠️performance]
The conditionr."challengeId" IS NOT NULL AND r."memberId" IS NOT NULL is used to filter out null values. Ensure that these columns are indexed if they are frequently queried, to improve performance.

termsChallengeTerm[]
skillsChallengeSkill[]
auditLogsAuditLog[]
memberAccessesMemberChallengeAccess[]

Choose a reason for hiding this comment

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

[⚠️maintainability]
The addition ofmemberAccesses in theChallenge model introduces a new relation toMemberChallengeAccess. Ensure that theMemberChallengeAccess model is correctly populated and maintained, as any orphaned records could lead to inconsistencies. Consider adding cascading delete or update rules if appropriate.

challengeChallenge@relation(fields:[challengeId],references:[id])
@@id([challengeId,memberId])

Choose a reason for hiding this comment

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

[❗❗correctness]
The composite primary key@@id([challengeId, memberId]) inMemberChallengeAccess ensures uniqueness of member/challenge pairs. Verify that this constraint aligns with the intended data model and that no existing data violates this constraint.

timelineTemplateId
);
const{ phaseDefinitionMap}=awaitthis.getPhaseDefinitionsAndMap();
constchallengePhaseIds=newSet(_.map(challengePhases,"phaseId"));

Choose a reason for hiding this comment

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

[⚠️performance]
Consider using_.keyBy instead of_.map followed bynew Set to directly create a set of phase IDs. This could improve performance by reducing the number of iterations overchallengePhases.

phaseId:phase.predecessor,
});
if(_.isNil(predecessorPhase)){
continue;

Choose a reason for hiding this comment

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

[⚠️correctness]
Thecontinue statement here skips processing phases without a valid predecessor. Ensure that this behavior is intentional and that skipping these phases won't lead to incorrect scheduling or logic errors.

@kkartunovkkartunov merged commit016a1b3 intodevelopNov 11, 2025
7 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

@jmgasperjmgasperAwaiting requested review from jmgasper

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@kkartunov@jmgasper

[8]ページ先頭

©2009-2025 Movatter.jp