Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Marigold committed Jan 21, 2025
1 parent 8f10393 commit 7ac070e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions db/migration/1736933781669-AddRelatedChartsTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export class AddRelatedChartsTable1736933781669 implements MigrationInterface {
label VARCHAR(255) NOT NULL,
reviewer VARCHAR(255) DEFAULT NULL,
reason TEXT DEFAULT NULL,
score NUMERIC DEFAULT NULL,
updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT related_charts_ibfk_1
FOREIGN KEY (chartId) REFERENCES charts (id)
Expand Down
3 changes: 2 additions & 1 deletion db/model/Chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,8 @@ export const getRelatedChartsForChart = async (
AND related_charts.label = 'good'
AND chart_configs.full->>"$.isPublished" = "true"
GROUP BY charts.id
ORDER BY title ASC
ORDER BY related_charts.score DESC
LIMIT 6
`
)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"startLocalCloudflareFunctions": "wrangler pages dev",
"startDeployQueueServer": "node --enable-source-maps ./itsJustJavascript/baker/startDeployQueueServer.js",
"startLernaWatcher": "lerna watch --scope '@ourworldindata/*' -- lerna run build --scope=\\$LERNA_PACKAGE_NAME --include-dependents",
"startTmuxServer": "node_modules/tmex/tmex dev \"yarn startLernaWatcher\" \"yarn startAdminDevServer\" \"yarn startViteServer\"",
"startTmuxServer": "node_modules/tmex/tmex dev \"yarn startLernaWatcher\" \"yarn startAdminDevServer\" \"yarn startSiteFront\"",
"startViteServer": "vite dev",
"startSiteFront": "./devTools/vite/startVite.sh",
"startLocalBakeServer": "http-server ./localBake -p 3000",
Expand Down

0 comments on commit 7ac070e

Please sign in to comment.