Skip to content

Commit 1c27e35

Browse files
committed
Add migration diffs for documentation
Add .diff files to show incremental changes between migrations: - 22_add_priority_to_resolution.sql.diff: shows priority field additions - 23_html_fallback_routing.sql.diff: shows .html fallback logic addition Makes it easier to review what changed in each migration without comparing full function bodies.
1 parent d157cf4 commit 1c27e35

3 files changed

Lines changed: 47 additions & 1 deletion

File tree

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"cSpell.words": ["binstall", "psql", "reqwest"]
2+
"cSpell.words": ["binstall", "prerendered", "psql", "reqwest"]
33
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
--- /dev/fd/11 2026-02-03 01:57:33
2+
+++ /dev/fd/12 2026-02-03 01:57:33
3+
@@ -17,6 +17,7 @@
4+
v_result.project_id := NULL;
5+
v_result.backend_type := 'worker'::enum_backend_type;
6+
v_result.assets_storage_id := NULL;
7+
+ v_result.priority := NULL;
8+
RETURN v_result;
9+
END IF;
10+
11+
@@ -51,7 +52,7 @@
12+
13+
-- If we have a project, match route pattern
14+
IF v_project_id_temp IS NOT NULL THEN
15+
- SELECT backend_type, worker_id
16+
+ SELECT backend_type, worker_id, priority
17+
INTO v_route_record
18+
FROM project_routes
19+
WHERE project_id = v_project_id_temp
20+
@@ -69,6 +70,7 @@
21+
v_result.project_id := v_project_id_temp;
22+
v_result.worker_id := v_route_record.worker_id;
23+
v_result.backend_type := v_route_record.backend_type;
24+
+ v_result.priority := v_route_record.priority;
25+
26+
-- If storage backend, get ASSETS storage_config_id from main worker's environment
27+
IF v_route_record.backend_type = 'storage' THEN
28+
@@ -96,6 +98,7 @@
29+
v_result.project_id := NULL;
30+
v_result.backend_type := 'worker'::enum_backend_type;
31+
v_result.assets_storage_id := NULL;
32+
+ v_result.priority := NULL;
33+
RETURN v_result;
34+
END IF;
35+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- /dev/fd/11 2026-02-03 01:56:12
2+
+++ /dev/fd/12 2026-02-03 01:56:12
3+
@@ -59,6 +59,8 @@
4+
AND (
5+
pattern = p_path
6+
OR (pattern LIKE '%/*' AND p_path LIKE REPLACE(pattern, '/*', '') || '%')
7+
+ -- Allow /about.html to match route /about (prerendered fallback)
8+
+ OR (p_path LIKE '%.html' AND pattern = REPLACE(p_path, '.html', ''))
9+
)
10+
ORDER BY priority DESC
11+
LIMIT 1;

0 commit comments

Comments
 (0)