@ainyc/canonry 2.4.2 → 2.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1036,7 +1036,22 @@ var MIGRATIONS = [
|
|
|
1036
1036
|
// v42: Per-project auto-extract toggle — when a release sync transitions
|
|
1037
1037
|
// to ready, projects with this flag get a backlink-extract run enqueued.
|
|
1038
1038
|
// Stored as INTEGER (0/1) to match SQLite boolean convention.
|
|
1039
|
-
`ALTER TABLE projects ADD COLUMN auto_extract_backlinks INTEGER NOT NULL DEFAULT 0
|
|
1039
|
+
`ALTER TABLE projects ADD COLUMN auto_extract_backlinks INTEGER NOT NULL DEFAULT 0`,
|
|
1040
|
+
// v43: Backfill bing_url_inspections.in_index using the new crawl-signal
|
|
1041
|
+
// decision tree. Legacy rows were classified with the retired Bing `InIndex`
|
|
1042
|
+
// flag plus a DocumentSize>0 check, which mis-classifies URLs that modern
|
|
1043
|
+
// Bing returns with DocumentSize=0 but a valid LastCrawledDate. Use a
|
|
1044
|
+
// created_at cutoff so rows written by the new code (which applies a live
|
|
1045
|
+
// GetCrawlIssues demotion that can't be replayed offline) are preserved.
|
|
1046
|
+
`UPDATE bing_url_inspections
|
|
1047
|
+
SET in_index = CASE
|
|
1048
|
+
WHEN document_size IS NOT NULL AND document_size > 0 THEN 1
|
|
1049
|
+
WHEN last_crawled_date IS NOT NULL AND http_code IS NOT NULL AND http_code >= 400 THEN 0
|
|
1050
|
+
WHEN last_crawled_date IS NOT NULL THEN 1
|
|
1051
|
+
WHEN discovery_date IS NOT NULL THEN 0
|
|
1052
|
+
ELSE NULL
|
|
1053
|
+
END
|
|
1054
|
+
WHERE created_at < '2026-04-22T00:00:00Z'`
|
|
1040
1055
|
];
|
|
1041
1056
|
function isDuplicateColumnError(err) {
|
|
1042
1057
|
if (!(err instanceof Error)) return false;
|