Proposal: SlowQL static analysis of migration scripts - insights and recommendations #45110
Unanswered
makroumi
asked this question in
Feature Requests
Replies: 1 comment
-
SQL Migration Analysis Report -
|
| Metric | Value |
|---|---|
| Total files scanned | 40 |
| Files with issues | 34 |
| Files clean | 6 |
| Total issues | 317 |
| Unique rules violated | 32 |
| Line resolution accuracy | 100% exact (317/317) |
Issues by Severity
| Severity | Count |
|---|---|
| Critical | 7 |
| High | 24 |
| Medium | 158 |
| Low | 95 |
| Info | 33 |
Issues by Dimension
| Dimension | Count |
|---|---|
| Quality | 226 |
| Reliability | 53 |
| Cost | 22 |
| Performance | 12 |
| Security | 2 |
| Compliance | 2 |
Detailed Findings with Code Snippets
All 317 issues with their exact SQL context, grouped by file and ordered by severity.
Detailed Findings with Code Snippets
All 317 issues with their exact SQL context, ordered by severity.
Critical - 7 issues
Issue #1 - SCHEMA-TBL-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | SCHEMA-TBL-001 |
| Severity | CRITICAL |
| Dimension | reliability |
| Subcategory | N/A |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Table 'users' does not exist in schema |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #2 - SCHEMA-TBL-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | SCHEMA-TBL-001 |
| Severity | CRITICAL |
| Dimension | reliability |
| Subcategory | N/A |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Table 'users' does not exist in schema |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #3 - SCHEMA-TBL-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | SCHEMA-TBL-001 |
| Severity | CRITICAL |
| Dimension | reliability |
| Subcategory | N/A |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Table 'tickets_view' does not exist in schema |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #4 - SCHEMA-TBL-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | SCHEMA-TBL-001 |
| Severity | CRITICAL |
| Dimension | reliability |
| Subcategory | N/A |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Table 'lw12_referrals' does not exist in schema |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #5 - SCHEMA-TBL-001 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | SCHEMA-TBL-001 |
| Severity | CRITICAL |
| Dimension | reliability |
| Subcategory | N/A |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 1, col 1, exact |
| Message | Table 'error' does not exist in schema |
>>> 1 | alter table content.error
2 | add column metadata jsonb;
3 |
4 | alter table content.error
5 | add constraint constraint_content_error_metadata_schema check (Issue #6 - SCHEMA-TBL-001 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | SCHEMA-TBL-001 |
| Severity | CRITICAL |
| Dimension | reliability |
| Subcategory | N/A |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 4, col 1, exact |
| Message | Table 'error' does not exist in schema |
1 | alter table content.error
2 | add column metadata jsonb;
3 |
>>> 4 | alter table content.error
5 | add constraint constraint_content_error_metadata_schema check (
6 | jsonb_matches_schema(
7 | '{
8 | "type": "object",Issue #7 - SCHEMA-TBL-001 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | SCHEMA-TBL-001 |
| Severity | CRITICAL |
| Dimension | reliability |
| Subcategory | N/A |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 31, col 1, exact |
| Message | Table 'update_error_code' does not exist in schema |
27 | metadata
28 | )
29 | );
30 |
>>> 31 | drop function content.update_error_code;
32 |
33 | -- Recreate function also taking a metadata field
34 | -- See comments for what is new
35 | create function content.update_error_code(High - 24 issues
Issue #8 - REL-DATA-004 · 20230217032716_page_hierarchy_function.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20230217032716_page_hierarchy_function.sql |
| Location | line 1, col 1, exact |
| Message | DROP statement detected. |
>>> 1 | drop function match_page_sections;
2 |
3 | create or replace function match_page_sections(embedding vector(1536), match_threshold float, match_count int, min_content_length int)
4 | returns table (id bigint, page_id bigint, slug text, heading text, content text, similarity float)
5 | language plpgsqlIssue #9 - REL-DATA-004 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 10, col 1, exact |
| Message | DROP statement detected. |
6 | -- move indexed content for fts search from page_section to page
7 | -- this should allow better rankings as it gives a better overview of
8 | -- search term frequency on that page
9 |
>>> 10 | drop index fts_search_index;
11 |
12 | alter table page_section
13 | drop column fts_tokens;
14 | Issue #10 - REL-DATA-004 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 35, col 1, exact |
| Message | DROP statement detected. |
31 |
32 | -- rank search by best match (title matches tend to rank better than content matches
33 | -- due to underlying ts_rank algorithm
34 |
>>> 35 | drop function docs_search_fts;
36 |
37 | create or replace function docs_search_fts(query text)
38 | returns table (
39 | id int8,Issue #11 - REL-RACE-001 · 20240605171314_last_changed_update.sql
| Field | Value |
|---|---|
| Rule | REL-RACE-001 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | race_condition |
| File | 20240605171314_last_changed_update.sql |
| Location | line 15, col 1, exact |
| Message | Read-modify-write pattern without FOR UPDATE or SERIALIZABLE isolation — race condition risk. |
11 | declare
12 | existing_id bigint;
13 | previous_checksum text;
14 | updated_check_time timestamp with time zone;
>>> 15 | begin
16 | select id, checksum into existing_id, previous_checksum
17 | from public.last_changed
18 | where
19 | parent_page = new_parent_pageIssue #12 - REL-DATA-004 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 149, col 1, exact |
| Message | DROP statement detected. |
145 | limit 10;
146 | end;
147 | $$;
148 |
>>> 149 | drop function public.match_page_sections;
150 |
151 | drop function public.get_page_parents;Issue #13 - REL-DATA-004 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 151, col 1, exact |
| Message | DROP statement detected. |
147 | $$;
148 |
149 | drop function public.match_page_sections;
150 |
>>> 151 | drop function public.get_page_parents;Issue #14 - REL-DATA-002 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-002 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240722100743_remote_schema.sql |
| Location | line 35, col 1, exact |
| Message | TRUNCATE TABLE detected outside explicit transaction: truncate |
31 | grant select on table "public"."active_pgbouncer_projects" to "anon";
32 |
33 | grant trigger on table "public"."active_pgbouncer_projects" to "anon";
34 |
>>> 35 | grant truncate on table "public"."active_pgbouncer_projects" to "anon";
36 |
37 | grant update on table "public"."active_pgbouncer_projects" to "anon";
38 |
39 | grant delete on table "public"."active_pgbouncer_projects" to "authenticated";Issue #15 - REL-DATA-002 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-002 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240722100743_remote_schema.sql |
| Location | line 49, col 1, exact |
| Message | TRUNCATE TABLE detected outside explicit transaction: truncate |
45 | grant select on table "public"."active_pgbouncer_projects" to "authenticated";
46 |
47 | grant trigger on table "public"."active_pgbouncer_projects" to "authenticated";
48 |
>>> 49 | grant truncate on table "public"."active_pgbouncer_projects" to "authenticated";
50 |
51 | grant update on table "public"."active_pgbouncer_projects" to "authenticated";
52 |
53 | grant delete on table "public"."active_pgbouncer_projects" to "service_role";Issue #16 - REL-DATA-002 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-002 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240722100743_remote_schema.sql |
| Location | line 63, col 1, exact |
| Message | TRUNCATE TABLE detected outside explicit transaction: truncate |
59 | grant select on table "public"."active_pgbouncer_projects" to "service_role";
60 |
61 | grant trigger on table "public"."active_pgbouncer_projects" to "service_role";
62 |
>>> 63 | grant truncate on table "public"."active_pgbouncer_projects" to "service_role";
64 |
65 | grant update on table "public"."active_pgbouncer_projects" to "service_role";
66 |
67 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "anon";Issue #17 - REL-DATA-002 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-002 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240722100743_remote_schema.sql |
| Location | line 77, col 1, exact |
| Message | TRUNCATE TABLE detected outside explicit transaction: truncate |
73 | grant select on table "public"."vercel_project_connections_without_supavisor" to "anon";
74 |
75 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "anon";
76 |
>>> 77 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "anon";
78 |
79 | grant update on table "public"."vercel_project_connections_without_supavisor" to "anon";
80 |
81 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "authenticated";Issue #18 - REL-DATA-002 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-002 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240722100743_remote_schema.sql |
| Location | line 91, col 1, exact |
| Message | TRUNCATE TABLE detected outside explicit transaction: truncate |
87 | grant select on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
88 |
89 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
90 |
>>> 91 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
92 |
93 | grant update on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
94 |
95 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "service_role";Issue #19 - REL-DATA-002 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-002 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240722100743_remote_schema.sql |
| Location | line 105, col 1, exact |
| Message | TRUNCATE TABLE detected outside explicit transaction: truncate |
101 | grant select on table "public"."vercel_project_connections_without_supavisor" to "service_role";
102 |
103 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "service_role";
104 |
>>> 105 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "service_role";
106 |
107 | grant update on table "public"."vercel_project_connections_without_supavisor" to "service_role";
108 |
109 | Issue #20 - REL-DATA-004 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 3, col 1, exact |
| Message | DROP statement detected. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
>>> 3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #21 - REL-DATA-004 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 4, col 1, exact |
| Message | DROP statement detected. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
>>> 4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #22 - REL-DATA-004 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 5, col 1, exact |
| Message | DROP statement detected. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
>>> 5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #23 - REL-DATA-004 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 6, col 1, exact |
| Message | DROP statement detected. |
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
>>> 6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #24 - REL-IDEM-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | REL-IDEM-001 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | idempotency |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 18, col 1, exact |
| Message | INSERT without idempotency guard — will fail or create duplicates on retry. |
14 | as PERMISSIVE
15 | for select
16 | using ( true );
17 |
>>> 18 | insert into public.launch_weeks (id) values ('lw12');
19 |
20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),Issue #25 - REL-DATA-004 · 20250430202653_return_meta_vector_search.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20250430202653_return_meta_vector_search.sql |
| Location | line 3, col 1, exact |
| Message | DROP statement detected. |
1 | -- Alter the search_content function to also return the page metadata
2 |
>>> 3 | drop function search_content;
4 |
5 | create or replace function search_content(
6 | embedding vector(1536),
7 | include_full_content boolean default false,Issue #26 - REL-RACE-001 · 20250521194255_error_code_update_functions.sql
| Field | Value |
|---|---|
| Rule | REL-RACE-001 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | race_condition |
| File | 20250521194255_error_code_update_functions.sql |
| Location | line 21, col 1, exact |
| Message | Read-modify-write pattern without FOR UPDATE or SERIALIZABLE isolation — race condition risk. |
17 | #variable_conflict use_variable
18 | declare
19 | service_id uuid;
20 | result boolean;
>>> 21 | begin
22 | insert into content.service (name)
23 | values (service)
24 | on conflict (name) do nothing;
25 | Issue #27 - REL-DATA-004 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 31, col 1, exact |
| Message | DROP statement detected. |
27 | metadata
28 | )
29 | );
30 |
>>> 31 | drop function content.update_error_code;
32 |
33 | -- Recreate function also taking a metadata field
34 | -- See comments for what is new
35 | create function content.update_error_code(Issue #28 - REL-RACE-001 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | REL-RACE-001 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | race_condition |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 51, col 1, exact |
| Message | Read-modify-write pattern without FOR UPDATE or SERIALIZABLE isolation — race condition risk. |
47 | #variable_conflict use_variable
48 | declare
49 | service_id uuid;
50 | result boolean;
>>> 51 | begin
52 | insert into content.service (name)
53 | values (service)
54 | on conflict (name) do nothing;
55 | Issue #29 - REL-DATA-004 · 20250529220759_error_code_delete_return_value.sql
| Field | Value |
|---|---|
| Rule | REL-DATA-004 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | data-integrity |
| File | 20250529220759_error_code_delete_return_value.sql |
| Location | line 1, col 1, exact |
| Message | DROP statement detected. |
>>> 1 | drop function content.delete_error_codes_except(jsonb);
2 |
3 | -- Recreating function to return the number of rows deleted
4 | create or replace function content.delete_error_codes_except(
5 | skip_codes jsonbIssue #30 - REL-RACE-001 · 20250529220759_error_code_delete_return_value.sql
| Field | Value |
|---|---|
| Rule | REL-RACE-001 |
| Severity | HIGH |
| Dimension | reliability |
| Subcategory | race_condition |
| File | 20250529220759_error_code_delete_return_value.sql |
| Location | line 4, col 1, exact |
| Message | Read-modify-write pattern without FOR UPDATE or SERIALIZABLE isolation - race condition risk. |
1 | drop function content.delete_error_codes_except(jsonb);
2 |
3 | -- Recreating function to return the number of rows deleted
>>> 4 | create or replace function content.delete_error_codes_except(
5 | skip_codes jsonb
6 | )
7 | returns integer
8 | set search_path = ''Issue #31 - COST-COMPUTE-001 · 20250529220759_error_code_delete_return_value.sql
| Field | Value |
|---|---|
| Rule | COST-COMPUTE-001 |
| Severity | HIGH |
| Dimension | cost |
| Subcategory | compute |
| File | 20250529220759_error_code_delete_return_value.sql |
| Location | line 4, col 1, exact |
| Message | Potential full table scan missing WHERE clause: select count(*) from updated; |
1 | drop function content.delete_error_codes_except(jsonb);
2 |
3 | -- Recreating function to return the number of rows deleted
>>> 4 | create or replace function content.delete_error_codes_except(
5 | skip_codes jsonb
6 | )
7 | returns integer
8 | set search_path = ''Medium - 158 issues
Issue #32 - QUAL-DBT-001 · 20230126220613_doc_embeddings.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230126220613_doc_embeddings.sql |
| Location | line 3, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
1 | create extension if not exists vector with schema public;
2 |
>>> 3 | create table "public"."page" (
4 | id bigserial primary key,
5 | path text not null unique,
6 | checksum text,
7 | meta jsonbIssue #33 - QUAL-DBT-002 · 20230126220613_doc_embeddings.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230126220613_doc_embeddings.sql |
| Location | line 3, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
1 | create extension if not exists vector with schema public;
2 |
>>> 3 | create table "public"."page" (
4 | id bigserial primary key,
5 | path text not null unique,
6 | checksum text,
7 | meta jsonbIssue #34 - QUAL-DBT-001 · 20230126220613_doc_embeddings.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230126220613_doc_embeddings.sql |
| Location | line 10, col 1, exact |
| Message | Table 'page_section' is hardcoded. Use {{ ref('page_section') }} or {{ source(...) }} instead. |
6 | checksum text,
7 | meta jsonb
8 | );
9 |
>>> 10 | create table "public"."page_section" (
11 | id bigserial primary key,
12 | page_id bigint not null references public.page on delete cascade,
13 | content text,
14 | token_count int,Issue #35 - QUAL-DBT-001 · 20230126220613_doc_embeddings.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230126220613_doc_embeddings.sql |
| Location | line 10, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
6 | checksum text,
7 | meta jsonb
8 | );
9 |
>>> 10 | create table "public"."page_section" (
11 | id bigserial primary key,
12 | page_id bigint not null references public.page on delete cascade,
13 | content text,
14 | token_count int,Issue #36 - QUAL-DBT-002 · 20230126220613_doc_embeddings.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230126220613_doc_embeddings.sql |
| Location | line 10, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
6 | checksum text,
7 | meta jsonb
8 | );
9 |
>>> 10 | create table "public"."page_section" (
11 | id bigserial primary key,
12 | page_id bigint not null references public.page on delete cascade,
13 | content text,
14 | token_count int,Issue #37 - QUAL-DBT-002 · 20230126220613_doc_embeddings.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230126220613_doc_embeddings.sql |
| Location | line 10, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
6 | checksum text,
7 | meta jsonb
8 | );
9 |
>>> 10 | create table "public"."page_section" (
11 | id bigserial primary key,
12 | page_id bigint not null references public.page on delete cascade,
13 | content text,
14 | token_count int,Issue #38 - QUAL-SCHEMA-002 · 20230126220613_doc_embeddings.sql
| Field | Value |
|---|---|
| Rule | QUAL-SCHEMA-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | schema_design |
| File | 20230126220613_doc_embeddings.sql |
| Location | line 10, col 1, exact |
| Message | Column 'page_id' looks like a foreign key but lacks a constraint |
6 | checksum text,
7 | meta jsonb
8 | );
9 |
>>> 10 | create table "public"."page_section" (
11 | id bigserial primary key,
12 | page_id bigint not null references public.page on delete cascade,
13 | content text,
14 | token_count int,Issue #39 - QUAL-DEAD-001 · 20230126220613_doc_embeddings.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20230126220613_doc_embeddings.sql |
| Location | line 10, col 1, exact |
| Message | Database object 'PAGE_SECTION' is defined but never used in the analyzed project. |
6 | checksum text,
7 | meta jsonb
8 | );
9 |
>>> 10 | create table "public"."page_section" (
11 | id bigserial primary key,
12 | page_id bigint not null references public.page on delete cascade,
13 | content text,
14 | token_count int,Issue #40 - QUAL-DBT-001 · 20230216195821_page_hierarchy.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230216195821_page_hierarchy.sql |
| Location | line 1, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
>>> 1 | alter table "public"."page"
2 | add parent_page_id bigint references public.page;Issue #41 - QUAL-DBT-001 · 20230216195821_page_hierarchy.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230216195821_page_hierarchy.sql |
| Location | line 1, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
>>> 1 | alter table "public"."page"
2 | add parent_page_id bigint references public.page;Issue #42 - QUAL-DBT-002 · 20230216195821_page_hierarchy.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230216195821_page_hierarchy.sql |
| Location | line 1, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
>>> 1 | alter table "public"."page"
2 | add parent_page_id bigint references public.page;Issue #43 - QUAL-DBT-002 · 20230216195821_page_hierarchy.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230216195821_page_hierarchy.sql |
| Location | line 1, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
>>> 1 | alter table "public"."page"
2 | add parent_page_id bigint references public.page;Issue #44 - QUAL-DBT-001 · 20230216232739_page_section_heading_slug.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230216232739_page_section_heading_slug.sql |
| Location | line 1, col 1, exact |
| Message | Table 'page_section' is hardcoded. Use {{ ref('page_section') }} or {{ source(...) }} instead. |
>>> 1 | alter table "public"."page_section"
2 | add column slug text,
3 | add column heading text;Issue #45 - QUAL-DBT-002 · 20230216232739_page_section_heading_slug.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230216232739_page_section_heading_slug.sql |
| Location | line 1, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
>>> 1 | alter table "public"."page_section"
2 | add column slug text,
3 | add column heading text;Issue #46 - QUAL-DBT-001 · 20230217032716_page_hierarchy_function.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230217032716_page_hierarchy_function.sql |
| Location | line 1, col 1, exact |
| Message | Table 'match_page_sections' is hardcoded. Use {{ ref('match_page_sections') }} or {{ source(...) }} instead. |
>>> 1 | drop function match_page_sections;
2 |
3 | create or replace function match_page_sections(embedding vector(1536), match_threshold float, match_count int, min_content_length int)
4 | returns table (id bigint, page_id bigint, slug text, heading text, content text, similarity float)
5 | language plpgsqlIssue #47 - QUAL-DBT-001 · 20230228205709_page_source.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230228205709_page_source.sql |
| Location | line 1, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
>>> 1 | alter table "public"."page"
2 | add column type text,
3 | add column source text;Issue #48 - QUAL-DBT-002 · 20230228205709_page_source.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230228205709_page_source.sql |
| Location | line 1, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
>>> 1 | alter table "public"."page"
2 | add column type text,
3 | add column source text;Issue #49 - QUAL-DBT-001 · 20230421193603_page_version.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230421193603_page_version.sql |
| Location | line 1, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
>>> 1 | alter table "public"."page"
2 | add "version" uuid,
3 | add "last_refresh" timestamptz;Issue #50 - QUAL-DBT-002 · 20230421193603_page_version.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20230421193603_page_version.sql |
| Location | line 1, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
>>> 1 | alter table "public"."page"
2 | add "version" uuid,
3 | add "last_refresh" timestamptz;Issue #51 - QUAL-DBT-001 · 20231121164837_modify_search_functions.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231121164837_modify_search_functions.sql |
| Location | line 1, col 1, exact |
| Message | Table 'page_section' is hardcoded. Use {{ ref('page_section') }} or {{ source(...) }} instead. |
>>> 1 | alter table page_section
2 | add column fts_tokens tsvector generated always as (to_tsvector('english', content)) stored;
3 |
4 | create index fts_search_index on page_section using gin(fts_tokens);
5 | Issue #52 - QUAL-DBT-001 · 20231121164837_modify_search_functions.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231121164837_modify_search_functions.sql |
| Location | line 4, col 1, exact |
| Message | Table 'page_section' is hardcoded. Use {{ ref('page_section') }} or {{ source(...) }} instead. |
1 | alter table page_section
2 | add column fts_tokens tsvector generated always as (to_tsvector('english', content)) stored;
3 |
>>> 4 | create index fts_search_index on page_section using gin(fts_tokens);
5 |
6 | create or replace function docs_search_fts(query text)
7 | returns table (
8 | id int8,Issue #53 - QUAL-DEAD-001 · 20231121164837_modify_search_functions.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20231121164837_modify_search_functions.sql |
| Location | line 4, col 1, exact |
| Message | Database object 'FTS_SEARCH_INDEX' is defined but never used in the analyzed project. |
1 | alter table page_section
2 | add column fts_tokens tsvector generated always as (to_tsvector('english', content)) stored;
3 |
>>> 4 | create index fts_search_index on page_section using gin(fts_tokens);
5 |
6 | create or replace function docs_search_fts(query text)
7 | returns table (
8 | id int8,Issue #54 - QUAL-DEAD-001 · 20231121164837_modify_search_functions.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20231121164837_modify_search_functions.sql |
| Location | line 6, col 1, exact |
| Message | Database object 'DOCS_SEARCH_FTS' is defined but never used in the analyzed project. |
2 | add column fts_tokens tsvector generated always as (to_tsvector('english', content)) stored;
3 |
4 | create index fts_search_index on page_section using gin(fts_tokens);
5 |
>>> 6 | create or replace function docs_search_fts(query text)
7 | returns table (
8 | id int8,
9 | path text,
10 | type text,Issue #55 - QUAL-DEAD-001 · 20231121164837_modify_search_functions.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20231121164837_modify_search_functions.sql |
| Location | line 43, col 1, exact |
| Message | Database object 'DOCS_SEARCH_EMBEDDINGS' is defined but never used in the analyzed project. |
39 | group by page.id;
40 | end;
41 | $$;
42 |
>>> 43 | create or replace function docs_search_embeddings(
44 | embedding vector(1536),
45 | match_threshold float
46 | )
47 | returns table (Issue #56 - QUAL-DBT-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 3, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
1 | -- remove unused column
2 |
>>> 3 | alter table page
4 | drop column parent_page_id;
5 |
6 | -- move indexed content for fts search from page_section to page
7 | -- this should allow better rankings as it gives a better overview ofIssue #57 - QUAL-DBT-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 3, col 1, exact |
| Message | Table 'parent_page_id' is hardcoded. Use {{ ref('parent_page_id') }} or {{ source(...) }} instead. |
1 | -- remove unused column
2 |
>>> 3 | alter table page
4 | drop column parent_page_id;
5 |
6 | -- move indexed content for fts search from page_section to page
7 | -- this should allow better rankings as it gives a better overview ofIssue #58 - QUAL-DBT-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 10, col 1, exact |
| Message | Table 'fts_search_index' is hardcoded. Use {{ ref('fts_search_index') }} or {{ source(...) }} instead. |
6 | -- move indexed content for fts search from page_section to page
7 | -- this should allow better rankings as it gives a better overview of
8 | -- search term frequency on that page
9 |
>>> 10 | drop index fts_search_index;
11 |
12 | alter table page_section
13 | drop column fts_tokens;
14 | Issue #59 - QUAL-DBT-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 12, col 1, exact |
| Message | Table 'page_section' is hardcoded. Use {{ ref('page_section') }} or {{ source(...) }} instead. |
8 | -- search term frequency on that page
9 |
10 | drop index fts_search_index;
11 |
>>> 12 | alter table page_section
13 | drop column fts_tokens;
14 |
15 | alter table page
16 | add column content text;Issue #60 - QUAL-DBT-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 12, col 1, exact |
| Message | Table 'fts_tokens' is hardcoded. Use {{ ref('fts_tokens') }} or {{ source(...) }} instead. |
8 | -- search term frequency on that page
9 |
10 | drop index fts_search_index;
11 |
>>> 12 | alter table page_section
13 | drop column fts_tokens;
14 |
15 | alter table page
16 | add column content text;Issue #61 - QUAL-DBT-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 15, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
11 |
12 | alter table page_section
13 | drop column fts_tokens;
14 |
>>> 15 | alter table page
16 | add column content text;
17 |
18 | alter table page
19 | add column fts_tokens tsvector generated always as (to_tsvector('english', content)) stored;Issue #62 - QUAL-DBT-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 18, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
14 |
15 | alter table page
16 | add column content text;
17 |
>>> 18 | alter table page
19 | add column fts_tokens tsvector generated always as (to_tsvector('english', content)) stored;
20 |
21 | create index fts_search_index_page on page using gin(fts_tokens);
22 | Issue #63 - QUAL-DBT-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 21, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
17 |
18 | alter table page
19 | add column fts_tokens tsvector generated always as (to_tsvector('english', content)) stored;
20 |
>>> 21 | create index fts_search_index_page on page using gin(fts_tokens);
22 |
23 | -- also search against the page title if it exists, to give more
24 | -- intuitive search rankings
25 | Issue #64 - QUAL-DEAD-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 21, col 1, exact |
| Message | Database object 'FTS_SEARCH_INDEX_PAGE' is defined but never used in the analyzed project. |
17 |
18 | alter table page
19 | add column fts_tokens tsvector generated always as (to_tsvector('english', content)) stored;
20 |
>>> 21 | create index fts_search_index_page on page using gin(fts_tokens);
22 |
23 | -- also search against the page title if it exists, to give more
24 | -- intuitive search rankings
25 | Issue #65 - QUAL-DBT-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 26, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
22 |
23 | -- also search against the page title if it exists, to give more
24 | -- intuitive search rankings
25 |
>>> 26 | alter table page
27 |
28 | add column title_tokens tsvector generated always as (to_tsvector('english', coalesce(meta ->> 'title', ''))) stored;
29 |
30 | create index fts_search_index_title on page using gin(title_tokens);Issue #66 - QUAL-DBT-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 30, col 1, exact |
| Message | Table 'page' is hardcoded. Use {{ ref('page') }} or {{ source(...) }} instead. |
26 | alter table page
27 |
28 | add column title_tokens tsvector generated always as (to_tsvector('english', coalesce(meta ->> 'title', ''))) stored;
29 |
>>> 30 | create index fts_search_index_title on page using gin(title_tokens);
31 |
32 | -- rank search by best match (title matches tend to rank better than content matches
33 | -- due to underlying ts_rank algorithm
34 | Issue #67 - QUAL-DEAD-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 30, col 1, exact |
| Message | Database object 'FTS_SEARCH_INDEX_TITLE' is defined but never used in the analyzed project. |
26 | alter table page
27 |
28 | add column title_tokens tsvector generated always as (to_tsvector('english', coalesce(meta ->> 'title', ''))) stored;
29 |
>>> 30 | create index fts_search_index_title on page using gin(title_tokens);
31 |
32 | -- rank search by best match (title matches tend to rank better than content matches
33 | -- due to underlying ts_rank algorithm
34 | Issue #68 - QUAL-DBT-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 35, col 1, exact |
| Message | Table 'docs_search_fts' is hardcoded. Use {{ ref('docs_search_fts') }} or {{ source(...) }} instead. |
31 |
32 | -- rank search by best match (title matches tend to rank better than content matches
33 | -- due to underlying ts_rank algorithm
34 |
>>> 35 | drop function docs_search_fts;
36 |
37 | create or replace function docs_search_fts(query text)
38 | returns table (
39 | id int8,Issue #69 - QUAL-DBT-001 · 20240123195252_add_rag_ignore_column.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240123195252_add_rag_ignore_column.sql |
| Location | line 1, col 1, exact |
| Message | Table 'page_section' is hardcoded. Use {{ ref('page_section') }} or {{ source(...) }} instead. |
>>> 1 | alter table page_section
2 | add column rag_ignore boolean
3 | default false;Issue #70 - SEC-PRIV-001 · 20240129101115_add_ipv6_active_status_rpc.sql
| Field | Value |
|---|---|
| Rule | SEC-PRIV-001 |
| Severity | MEDIUM |
| Dimension | security |
| Subcategory | authentication |
| File | 20240129101115_add_ipv6_active_status_rpc.sql |
| Location | line 21, col 1, exact |
| Message | Overprivileged execution context detected: security definer |
17 | ) into vercel_active;
18 |
19 | return query select pgbouncer_active, vercel_active;
20 | end;
>>> 21 | $$ language plpgsql security definer;Issue #71 - QUAL-DBT-001 · 20240208001120_add_feedback_table.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240208001120_add_feedback_table.sql |
| Location | line 6, col 1, exact |
| Message | Table 'feedback' is hardcoded. Use {{ ref('feedback') }} or {{ source(...) }} instead. |
2 | 'yes',
3 | 'no'
4 | );
5 |
>>> 6 | create table feedback (
7 | id bigint primary key generated always as identity,
8 | date_created date not null default current_date,
9 | vote feedback_vote not null,
10 | page text not nullIssue #72 - QUAL-DEAD-001 · 20240208001120_add_feedback_table.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240208001120_add_feedback_table.sql |
| Location | line 6, col 1, exact |
| Message | Database object 'FEEDBACK' is defined but never used in the analyzed project. |
2 | 'yes',
3 | 'no'
4 | );
5 |
>>> 6 | create table feedback (
7 | id bigint primary key generated always as identity,
8 | date_created date not null default current_date,
9 | vote feedback_vote not null,
10 | page text not nullIssue #73 - QUAL-DBT-001 · 20240403133820_track_feedback_query_params.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240403133820_track_feedback_query_params.sql |
| Location | line 1, col 1, exact |
| Message | Table 'feedback' is hardcoded. Use {{ ref('feedback') }} or {{ source(...) }} instead. |
>>> 1 | alter table public.feedback
2 | add column metadata jsonb;Issue #74 - QUAL-DBT-002 · 20240403133820_track_feedback_query_params.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240403133820_track_feedback_query_params.sql |
| Location | line 1, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
>>> 1 | alter table public.feedback
2 | add column metadata jsonb;Issue #75 - QUAL-DBT-001 · 20240604035404_last_changed.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240604035404_last_changed.sql |
| Location | line 1, col 1, exact |
| Message | Table 'last_changed' is hardcoded. Use {{ ref('last_changed') }} or {{ source(...) }} instead. |
>>> 1 | create table last_changed (
2 | id bigint primary key generated always as identity,
3 | checksum text not null,
4 | parent_page text not null,
5 | heading text not null,Issue #76 - QUAL-DBT-001 · 20240604035404_last_changed.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240604035404_last_changed.sql |
| Location | line 11, col 1, exact |
| Message | Table 'last_changed' is hardcoded. Use {{ ref('last_changed') }} or {{ source(...) }} instead. |
7 | last_checked timestamp with time zone default now() not null,
8 | unique (parent_page, heading)
9 | );
10 |
>>> 11 | comment on table last_changed is
12 | 'Records when page sections from docs content were last edited.';
13 | comment on column last_changed.checksum is
14 | 'Checksum of most recent section contents.';
15 | comment on column last_changed.parent_page isIssue #77 - QUAL-DBT-001 · 20240604035404_last_changed.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240604035404_last_changed.sql |
| Location | line 27, col 1, exact |
| Message | Table 'last_changed' is hardcoded. Use {{ ref('last_changed') }} or {{ source(...) }} instead. |
23 |
24 | revoke all on last_changed from anon;
25 | revoke all on last_changed from authenticated;
26 |
>>> 27 | create index idx_last_changed_parent_page_btree
28 | on last_changed (parent_page);Issue #78 - COST-IDX-001 · 20240604035404_last_changed.sql
| Field | Value |
|---|---|
| Rule | COST-IDX-001 |
| Severity | MEDIUM |
| Dimension | cost |
| Subcategory | index_waste |
| File | 20240604035404_last_changed.sql |
| Location | line 27, col 1, exact |
| Message | Duplicate index signal detected: create index idx_last_changed_parent_page_btree on last_changed (parent_page). Verify if index already exists. |
23 |
24 | revoke all on last_changed from anon;
25 | revoke all on last_changed from authenticated;
26 |
>>> 27 | create index idx_last_changed_parent_page_btree
28 | on last_changed (parent_page);Issue #79 - QUAL-DEAD-001 · 20240604035404_last_changed.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240604035404_last_changed.sql |
| Location | line 27, col 1, exact |
| Message | Database object 'IDX_LAST_CHANGED_PARENT_PAGE_BTREE' is defined but never used in the analyzed project. |
23 |
24 | revoke all on last_changed from anon;
25 | revoke all on last_changed from authenticated;
26 |
>>> 27 | create index idx_last_changed_parent_page_btree
28 | on last_changed (parent_page);Issue #80 - COST-PAGE-003 · 20240605171314_last_changed_update.sql
| Field | Value |
|---|---|
| Rule | COST-PAGE-003 |
| Severity | MEDIUM |
| Dimension | cost |
| Subcategory | pagination |
| File | 20240605171314_last_changed_update.sql |
| Location | line 79, col 1, exact |
| Message | Expensive COUNT(*) for pagination total detected on unfiltered table. |
75 | as $$
76 | declare
77 | newest_check_time timestamp with time zone;
78 | number_deleted integer;
>>> 79 | begin
80 | select last_checked into newest_check_time
81 | from public.last_changed
82 | order by last_checked desc
83 | limit 1Issue #81 - SEC-PRIV-001 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | SEC-PRIV-001 |
| Severity | MEDIUM |
| Dimension | security |
| Subcategory | authentication |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 65, col 1, exact |
| Message | Overprivileged execution context detected: security definer |
61 | ) into vercel_active;
62 |
63 | return query select pgbouncer_active, vercel_active;
64 | end;
>>> 65 | $$ language plpgsql security definer;
66 |
67 | create or replace function docs_search_embeddings(
68 | embedding vector(1536),
69 | match_threshold floatIssue #82 - QUAL-DEAD-001 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 67, col 1, exact |
| Message | Database object 'DOCS_SEARCH_EMBEDDINGS' is defined but never used in the analyzed project. |
63 | return query select pgbouncer_active, vercel_active;
64 | end;
65 | $$ language plpgsql security definer;
66 |
>>> 67 | create or replace function docs_search_embeddings(
68 | embedding vector(1536),
69 | match_threshold float
70 | )
71 | returns table (Issue #83 - QUAL-DBT-001 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 149, col 1, exact |
| Message | Table 'match_page_sections' is hardcoded. Use {{ ref('match_page_sections') }} or {{ source(...) }} instead. |
145 | limit 10;
146 | end;
147 | $$;
148 |
>>> 149 | drop function public.match_page_sections;
150 |
151 | drop function public.get_page_parents;Issue #84 - QUAL-DBT-002 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 149, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
145 | limit 10;
146 | end;
147 | $$;
148 |
>>> 149 | drop function public.match_page_sections;
150 |
151 | drop function public.get_page_parents;Issue #85 - QUAL-DBT-001 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 151, col 1, exact |
| Message | Table 'get_page_parents' is hardcoded. Use {{ ref('get_page_parents') }} or {{ source(...) }} instead. |
147 | $$;
148 |
149 | drop function public.match_page_sections;
150 |
>>> 151 | drop function public.get_page_parents;Issue #86 - QUAL-DBT-002 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 151, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
147 | $$;
148 |
149 | drop function public.match_page_sections;
150 |
>>> 151 | drop function public.get_page_parents;Issue #87 - QUAL-DBT-001 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240722100743_remote_schema.sql |
| Location | line 1, col 1, exact |
| Message | Table 'active_pgbouncer_projects' is hardcoded. Use {{ ref('active_pgbouncer_projects') }} or {{ source(...) }} instead. |
>>> 1 | create table "public"."active_pgbouncer_projects" (
2 | "id" bigint generated by default as identity not null,
3 | "project_ref" text
4 | );
5 | Issue #88 - QUAL-DBT-002 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240722100743_remote_schema.sql |
| Location | line 1, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
>>> 1 | create table "public"."active_pgbouncer_projects" (
2 | "id" bigint generated by default as identity not null,
3 | "project_ref" text
4 | );
5 | Issue #89 - QUAL-DBT-001 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240722100743_remote_schema.sql |
| Location | line 9, col 1, exact |
| Message | Table 'vercel_project_connections_without_supavisor' is hardcoded. Use {{ ref('vercel_project_connections_without_supavisor') }} or {{ source(...) }} instead. |
5 |
6 |
7 | alter table "public"."active_pgbouncer_projects" enable row level security;
8 |
>>> 9 | create table "public"."vercel_project_connections_without_supavisor" (
10 | "id" bigint generated by default as identity not null,
11 | "project_ref" text not null
12 | );
13 | Issue #90 - QUAL-DBT-002 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240722100743_remote_schema.sql |
| Location | line 9, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
5 |
6 |
7 | alter table "public"."active_pgbouncer_projects" enable row level security;
8 |
>>> 9 | create table "public"."vercel_project_connections_without_supavisor" (
10 | "id" bigint generated by default as identity not null,
11 | "project_ref" text not null
12 | );
13 | Issue #91 - QUAL-DBT-001 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240722100743_remote_schema.sql |
| Location | line 17, col 1, exact |
| Message | Table 'active_pgbouncer_projects' is hardcoded. Use {{ ref('active_pgbouncer_projects') }} or {{ source(...) }} instead. |
13 |
14 |
15 | alter table "public"."vercel_project_connections_without_supavisor" enable row level security;
16 |
>>> 17 | CREATE UNIQUE INDEX active_pgbouncer_projects_pkey ON public.active_pgbouncer_projects USING btree (id);
18 |
19 | CREATE UNIQUE INDEX vercel_project_connections_without_supavisor_pkey ON public.vercel_project_connections_without_supavisor USING btree (id);
20 |
21 | alter table "public"."active_pgbouncer_projects" add constraint "active_pgbouncer_projects_pkey" PRIMARY KEY using index "active_pgbouncer_projects_pkey";Issue #92 - QUAL-DBT-002 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240722100743_remote_schema.sql |
| Location | line 17, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
13 |
14 |
15 | alter table "public"."vercel_project_connections_without_supavisor" enable row level security;
16 |
>>> 17 | CREATE UNIQUE INDEX active_pgbouncer_projects_pkey ON public.active_pgbouncer_projects USING btree (id);
18 |
19 | CREATE UNIQUE INDEX vercel_project_connections_without_supavisor_pkey ON public.vercel_project_connections_without_supavisor USING btree (id);
20 |
21 | alter table "public"."active_pgbouncer_projects" add constraint "active_pgbouncer_projects_pkey" PRIMARY KEY using index "active_pgbouncer_projects_pkey";Issue #93 - QUAL-DEAD-001 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 17, col 1, exact |
| Message | Database object 'ACTIVE_PGBOUNCER_PROJECTS_PKEY' is defined but never used in the analyzed project. |
13 |
14 |
15 | alter table "public"."vercel_project_connections_without_supavisor" enable row level security;
16 |
>>> 17 | CREATE UNIQUE INDEX active_pgbouncer_projects_pkey ON public.active_pgbouncer_projects USING btree (id);
18 |
19 | CREATE UNIQUE INDEX vercel_project_connections_without_supavisor_pkey ON public.vercel_project_connections_without_supavisor USING btree (id);
20 |
21 | alter table "public"."active_pgbouncer_projects" add constraint "active_pgbouncer_projects_pkey" PRIMARY KEY using index "active_pgbouncer_projects_pkey";Issue #94 - QUAL-DBT-001 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240722100743_remote_schema.sql |
| Location | line 19, col 1, exact |
| Message | Table 'vercel_project_connections_without_supavisor' is hardcoded. Use {{ ref('vercel_project_connections_without_supavisor') }} or {{ source(...) }} instead. |
15 | alter table "public"."vercel_project_connections_without_supavisor" enable row level security;
16 |
17 | CREATE UNIQUE INDEX active_pgbouncer_projects_pkey ON public.active_pgbouncer_projects USING btree (id);
18 |
>>> 19 | CREATE UNIQUE INDEX vercel_project_connections_without_supavisor_pkey ON public.vercel_project_connections_without_supavisor USING btree (id);
20 |
21 | alter table "public"."active_pgbouncer_projects" add constraint "active_pgbouncer_projects_pkey" PRIMARY KEY using index "active_pgbouncer_projects_pkey";
22 |
23 | alter table "public"."vercel_project_connections_without_supavisor" add constraint "vercel_project_connections_without_supavisor_pkey" PRIMARY KEY using index "vercel_project_connections_without_supavisor_pkey";Issue #95 - QUAL-DBT-002 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240722100743_remote_schema.sql |
| Location | line 19, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
15 | alter table "public"."vercel_project_connections_without_supavisor" enable row level security;
16 |
17 | CREATE UNIQUE INDEX active_pgbouncer_projects_pkey ON public.active_pgbouncer_projects USING btree (id);
18 |
>>> 19 | CREATE UNIQUE INDEX vercel_project_connections_without_supavisor_pkey ON public.vercel_project_connections_without_supavisor USING btree (id);
20 |
21 | alter table "public"."active_pgbouncer_projects" add constraint "active_pgbouncer_projects_pkey" PRIMARY KEY using index "active_pgbouncer_projects_pkey";
22 |
23 | alter table "public"."vercel_project_connections_without_supavisor" add constraint "vercel_project_connections_without_supavisor_pkey" PRIMARY KEY using index "vercel_project_connections_without_supavisor_pkey";Issue #96 - QUAL-DEAD-001 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 19, col 1, exact |
| Message | Database object 'VERCEL_PROJECT_CONNECTIONS_WITHOUT_SUPAVISOR_PKEY' is defined but never used in the analyzed project. |
15 | alter table "public"."vercel_project_connections_without_supavisor" enable row level security;
16 |
17 | CREATE UNIQUE INDEX active_pgbouncer_projects_pkey ON public.active_pgbouncer_projects USING btree (id);
18 |
>>> 19 | CREATE UNIQUE INDEX vercel_project_connections_without_supavisor_pkey ON public.vercel_project_connections_without_supavisor USING btree (id);
20 |
21 | alter table "public"."active_pgbouncer_projects" add constraint "active_pgbouncer_projects_pkey" PRIMARY KEY using index "active_pgbouncer_projects_pkey";
22 |
23 | alter table "public"."vercel_project_connections_without_supavisor" add constraint "vercel_project_connections_without_supavisor_pkey" PRIMARY KEY using index "vercel_project_connections_without_supavisor_pkey";Issue #97 - QUAL-DBT-001 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 1, col 1, exact |
| Message | Table 'active_pgbouncer_projects' is hardcoded. Use {{ ref('active_pgbouncer_projects') }} or {{ source(...) }} instead. |
>>> 1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";Issue #98 - QUAL-DBT-001 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 1, col 1, exact |
| Message | Table 'active_pgbouncer_projects_pkey' is hardcoded. Use {{ ref('active_pgbouncer_projects_pkey') }} or {{ source(...) }} instead. |
>>> 1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";Issue #99 - QUAL-DBT-002 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 1, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
>>> 1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";Issue #100 - QUAL-DBT-001 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 2, col 1, exact |
| Message | Table 'vercel_project_connections_without_supavisor' is hardcoded. Use {{ ref('vercel_project_connections_without_supavisor') }} or {{ source(...) }} instead. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
>>> 2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #101 - QUAL-DBT-001 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 2, col 1, exact |
| Message | Table 'vercel_project_connections_without_supavisor_pkey' is hardcoded. Use {{ ref('vercel_project_connections_without_supavisor_pkey') }} or {{ source(...) }} instead. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
>>> 2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #102 - QUAL-DBT-002 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 2, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
>>> 2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #103 - QUAL-DBT-001 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 3, col 1, exact |
| Message | Table 'active_pgbouncer_projects_pkey' is hardcoded. Use {{ ref('active_pgbouncer_projects_pkey') }} or {{ source(...) }} instead. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
>>> 3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #104 - QUAL-DBT-002 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 3, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
>>> 3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #105 - QUAL-DBT-001 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 4, col 1, exact |
| Message | Table 'vercel_project_connections_without_supavisor_pkey' is hardcoded. Use {{ ref('vercel_project_connections_without_supavisor_pkey') }} or {{ source(...) }} instead. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
>>> 4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #106 - QUAL-DBT-002 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 4, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
>>> 4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #107 - QUAL-DBT-001 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 5, col 1, exact |
| Message | Table 'active_pgbouncer_projects' is hardcoded. Use {{ ref('active_pgbouncer_projects') }} or {{ source(...) }} instead. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
>>> 5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #108 - QUAL-DBT-002 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 5, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
>>> 5 | drop table "public"."active_pgbouncer_projects";
6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #109 - QUAL-DBT-001 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 6, col 1, exact |
| Message | Table 'vercel_project_connections_without_supavisor' is hardcoded. Use {{ ref('vercel_project_connections_without_supavisor') }} or {{ source(...) }} instead. |
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
>>> 6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #110 - QUAL-DBT-002 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 6, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";
>>> 6 | drop table "public"."vercel_project_connections_without_supavisor";Issue #111 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 3, col 1, exact |
| Message | Table 'launch_weeks' is hardcoded. Use {{ ref('launch_weeks') }} or {{ source(...) }} instead. |
1 | create extension if not exists "uuid-ossp";
2 |
>>> 3 | create table public.launch_weeks (
4 | id text not null primary key, -- 'lw12', 'lw13', etc
5 | created_at timestamp with time zone not null default timezone ('utc'::text, now()),
6 | start_date timestamp with time zone null,
7 | end_date timestamp with time zone nullIssue #112 - QUAL-DBT-002 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 3, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
1 | create extension if not exists "uuid-ossp";
2 |
>>> 3 | create table public.launch_weeks (
4 | id text not null primary key, -- 'lw12', 'lw13', etc
5 | created_at timestamp with time zone not null default timezone ('utc'::text, now()),
6 | start_date timestamp with time zone null,
7 | end_date timestamp with time zone nullIssue #113 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 18, col 1, exact |
| Message | Table 'launch_weeks' is hardcoded. Use {{ ref('launch_weeks') }} or {{ source(...) }} instead. |
14 | as PERMISSIVE
15 | for select
16 | using ( true );
17 |
>>> 18 | insert into public.launch_weeks (id) values ('lw12');
19 |
20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),Issue #114 - QUAL-DBT-002 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 18, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
14 | as PERMISSIVE
15 | for select
16 | using ( true );
17 |
>>> 18 | insert into public.launch_weeks (id) values ('lw12');
19 |
20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),Issue #115 - QUAL-STYLE-005 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-STYLE-005 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | readability |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 18, col 1, exact |
| Message | INSERT without column list — fragile if schema changes. |
14 | as PERMISSIVE
15 | for select
16 | using ( true );
17 |
>>> 18 | insert into public.launch_weeks (id) values ('lw12');
19 |
20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),Issue #116 - COMP-GDPR-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | COMP-GDPR-001 |
| Severity | MEDIUM |
| Dimension | compliance |
| Subcategory | gdpr |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Potential PII column accessed: email |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #117 - COMP-GDPR-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | COMP-GDPR-001 |
| Severity | MEDIUM |
| Dimension | compliance |
| Subcategory | gdpr |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Potential PII column accessed: email |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #118 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Table 'tickets' is hardcoded. Use {{ ref('tickets') }} or {{ source(...) }} instead. |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #119 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Table 'launch_weeks' is hardcoded. Use {{ ref('launch_weeks') }} or {{ source(...) }} instead. |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #120 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Table 'users' is hardcoded. Use {{ ref('users') }} or {{ source(...) }} instead. |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #121 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Table 'users' is hardcoded. Use {{ ref('users') }} or {{ source(...) }} instead. |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #122 - QUAL-DBT-002 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #123 - QUAL-DBT-002 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #124 - QUAL-DBT-002 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Hardcoded schema 'auth' found in table reference. |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #125 - QUAL-DBT-002 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Hardcoded schema 'auth' found in table reference. |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #126 - QUAL-SCHEMA-003 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-SCHEMA-003 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | schema_design |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Missing index on FK 'user_id' |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #127 - PERF-NET-002 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | PERF-NET-002 |
| Severity | MEDIUM |
| Dimension | performance |
| Subcategory | network |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Unbounded SELECT of large object column 'metadata' |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #128 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Table 'tickets_view' is hardcoded. Use {{ ref('tickets_view') }} or {{ source(...) }} instead. |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #129 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Table 'tickets' is hardcoded. Use {{ ref('tickets') }} or {{ source(...) }} instead. |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #130 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Table 'lw12_referrals' is hardcoded. Use {{ ref('lw12_referrals') }} or {{ source(...) }} instead. |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #131 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Table 'tickets' is hardcoded. Use {{ ref('tickets') }} or {{ source(...) }} instead. |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #132 - QUAL-DBT-002 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #133 - SCHEMA-IDX-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | SCHEMA-IDX-001 |
| Severity | MEDIUM |
| Dimension | performance |
| Subcategory | N/A |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Column 'referred_by' used in WHERE clause lacks an index on table 'tickets' |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #134 - QUAL-DEAD-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Database object 'TICKETS_VIEW' is defined but never used in the analyzed project. |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #135 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 120, col 1, exact |
| Message | Table 'meetups' is hardcoded. Use {{ ref('meetups') }} or {{ source(...) }} instead. |
116 | tickets
117 | left join lw12_referrals on tickets.username = lw12_referrals.referred_by;
118 |
119 | -- Create meetups table
>>> 120 | create table
121 | public.meetups (
122 | id uuid not null default uuid_generate_v4(),
123 | created_at timestamp with time zone not null default now(),
124 | launch_week text not null references public.launch_weeks (id),Issue #136 - QUAL-DBT-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 120, col 1, exact |
| Message | Table 'launch_weeks' is hardcoded. Use {{ ref('launch_weeks') }} or {{ source(...) }} instead. |
116 | tickets
117 | left join lw12_referrals on tickets.username = lw12_referrals.referred_by;
118 |
119 | -- Create meetups table
>>> 120 | create table
121 | public.meetups (
122 | id uuid not null default uuid_generate_v4(),
123 | created_at timestamp with time zone not null default now(),
124 | launch_week text not null references public.launch_weeks (id),Issue #137 - QUAL-DBT-002 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 120, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
116 | tickets
117 | left join lw12_referrals on tickets.username = lw12_referrals.referred_by;
118 |
119 | -- Create meetups table
>>> 120 | create table
121 | public.meetups (
122 | id uuid not null default uuid_generate_v4(),
123 | created_at timestamp with time zone not null default now(),
124 | launch_week text not null references public.launch_weeks (id),Issue #138 - QUAL-DBT-002 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 120, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
116 | tickets
117 | left join lw12_referrals on tickets.username = lw12_referrals.referred_by;
118 |
119 | -- Create meetups table
>>> 120 | create table
121 | public.meetups (
122 | id uuid not null default uuid_generate_v4(),
123 | created_at timestamp with time zone not null default now(),
124 | launch_week text not null references public.launch_weeks (id),Issue #139 - QUAL-DEAD-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 120, col 1, exact |
| Message | Database object 'MEETUPS' is defined but never used in the analyzed project. |
116 | tickets
117 | left join lw12_referrals on tickets.username = lw12_referrals.referred_by;
118 |
119 | -- Create meetups table
>>> 120 | create table
121 | public.meetups (
122 | id uuid not null default uuid_generate_v4(),
123 | created_at timestamp with time zone not null default now(),
124 | launch_week text not null references public.launch_weeks (id),Issue #140 - QUAL-DBT-001 · 20240918220938_validation_history.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240918220938_validation_history.sql |
| Location | line 1, col 1, exact |
| Message | Table 'validation_history' is hardcoded. Use {{ ref('validation_history') }} or {{ source(...) }} instead. |
>>> 1 | create table validation_history (
2 | id bigint generated always as identity primary key,
3 | tag text not null,
4 | created_at timestamp with time zone not null default now()
5 | );Issue #141 - QUAL-DBT-001 · 20240918220938_validation_history.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20240918220938_validation_history.sql |
| Location | line 7, col 1, exact |
| Message | Table 'validation_history' is hardcoded. Use {{ ref('validation_history') }} or {{ source(...) }} instead. |
3 | tag text not null,
4 | created_at timestamp with time zone not null default now()
5 | );
6 |
>>> 7 | create index validation_history_tag_created_at_idx on validation_history (tag, created_at desc);
8 |
9 | alter table validation_history enable row level security;
10 |
11 | create or replace function get_last_revalidation_for_tags(tags text[])Issue #142 - COST-IDX-001 · 20240918220938_validation_history.sql
| Field | Value |
|---|---|
| Rule | COST-IDX-001 |
| Severity | MEDIUM |
| Dimension | cost |
| Subcategory | index_waste |
| File | 20240918220938_validation_history.sql |
| Location | line 7, col 1, exact |
| Message | Duplicate index signal detected: create index validation_history_tag_created_at_idx on validation_history (tag, created_at desc). Verify if index already exists. |
3 | tag text not null,
4 | created_at timestamp with time zone not null default now()
5 | );
6 |
>>> 7 | create index validation_history_tag_created_at_idx on validation_history (tag, created_at desc);
8 |
9 | alter table validation_history enable row level security;
10 |
11 | create or replace function get_last_revalidation_for_tags(tags text[])Issue #143 - QUAL-DEAD-001 · 20240918220938_validation_history.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240918220938_validation_history.sql |
| Location | line 7, col 1, exact |
| Message | Database object 'VALIDATION_HISTORY_TAG_CREATED_AT_IDX' is defined but never used in the analyzed project. |
3 | tag text not null,
4 | created_at timestamp with time zone not null default now()
5 | );
6 |
>>> 7 | create index validation_history_tag_created_at_idx on validation_history (tag, created_at desc);
8 |
9 | alter table validation_history enable row level security;
10 |
11 | create or replace function get_last_revalidation_for_tags(tags text[])Issue #144 - QUAL-DEAD-001 · 20240918220938_validation_history.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240918220938_validation_history.sql |
| Location | line 11, col 1, exact |
| Message | Database object 'GET_LAST_REVALIDATION_FOR_TAGS' is defined but never used in the analyzed project. |
7 | create index validation_history_tag_created_at_idx on validation_history (tag, created_at desc);
8 |
9 | alter table validation_history enable row level security;
10 |
>>> 11 | create or replace function get_last_revalidation_for_tags(tags text[])
12 | returns table (
13 | tag text,
14 | created_at timestamp with time zone
15 | )Issue #145 - QUAL-DBT-001 · 20241002215612_troubleshooting_validation.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20241002215612_troubleshooting_validation.sql |
| Location | line 1, col 1, exact |
| Message | Table 'troubleshooting_entries' is hardcoded. Use {{ ref('troubleshooting_entries') }} or {{ source(...) }} instead. |
>>> 1 | alter table troubleshooting_entries
2 | add column github_id text not null;
3 |
4 | alter table troubleshooting_entries
5 | add column checksum text not null;Issue #146 - QUAL-DBT-001 · 20241002215612_troubleshooting_validation.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20241002215612_troubleshooting_validation.sql |
| Location | line 4, col 1, exact |
| Message | Table 'troubleshooting_entries' is hardcoded. Use {{ ref('troubleshooting_entries') }} or {{ source(...) }} instead. |
1 | alter table troubleshooting_entries
2 | add column github_id text not null;
3 |
>>> 4 | alter table troubleshooting_entries
5 | add column checksum text not null;
6 |
7 | create index idx_troubleshooting_checksum
8 | on troubleshooting_entries (checksum);Issue #147 - QUAL-DBT-001 · 20241002215612_troubleshooting_validation.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20241002215612_troubleshooting_validation.sql |
| Location | line 7, col 1, exact |
| Message | Table 'troubleshooting_entries' is hardcoded. Use {{ ref('troubleshooting_entries') }} or {{ source(...) }} instead. |
3 |
4 | alter table troubleshooting_entries
5 | add column checksum text not null;
6 |
>>> 7 | create index idx_troubleshooting_checksum
8 | on troubleshooting_entries (checksum);
9 |
10 | create extension pg_jsonschema;
11 | Issue #148 - COST-IDX-001 · 20241002215612_troubleshooting_validation.sql
| Field | Value |
|---|---|
| Rule | COST-IDX-001 |
| Severity | MEDIUM |
| Dimension | cost |
| Subcategory | index_waste |
| File | 20241002215612_troubleshooting_validation.sql |
| Location | line 7, col 1, exact |
| Message | Duplicate index signal detected: create index idx_troubleshooting_checksum on troubleshooting_entries (checksum). Verify if index already exists. |
3 |
4 | alter table troubleshooting_entries
5 | add column checksum text not null;
6 |
>>> 7 | create index idx_troubleshooting_checksum
8 | on troubleshooting_entries (checksum);
9 |
10 | create extension pg_jsonschema;
11 | Issue #149 - QUAL-DEAD-001 · 20241002215612_troubleshooting_validation.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20241002215612_troubleshooting_validation.sql |
| Location | line 7, col 1, exact |
| Message | Database object 'IDX_TROUBLESHOOTING_CHECKSUM' is defined but never used in the analyzed project. |
3 |
4 | alter table troubleshooting_entries
5 | add column checksum text not null;
6 |
>>> 7 | create index idx_troubleshooting_checksum
8 | on troubleshooting_entries (checksum);
9 |
10 | create extension pg_jsonschema;
11 | Issue #150 - PERF-IDX-007 · 20241002215612_troubleshooting_validation.sql
| Field | Value |
|---|---|
| Rule | PERF-IDX-007 |
| Severity | MEDIUM |
| Dimension | performance |
| Subcategory | index |
| File | 20241002215612_troubleshooting_validation.sql |
| Location | line 12, col 1, exact |
| Message | OR condition across different columns (api OR instance, schema, api) prevents index usage |
8 | on troubleshooting_entries (checksum);
9 |
10 | create extension pg_jsonschema;
11 |
>>> 12 | alter table troubleshooting_entries
13 | add constraint troubleshooting_api_check
14 | check (
15 | api is null or
16 | jsonb_matches_schema(Issue #151 - QUAL-DBT-001 · 20241002215612_troubleshooting_validation.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20241002215612_troubleshooting_validation.sql |
| Location | line 12, col 1, exact |
| Message | Table 'troubleshooting_entries' is hardcoded. Use {{ ref('troubleshooting_entries') }} or {{ source(...) }} instead. |
8 | on troubleshooting_entries (checksum);
9 |
10 | create extension pg_jsonschema;
11 |
>>> 12 | alter table troubleshooting_entries
13 | add constraint troubleshooting_api_check
14 | check (
15 | api is null or
16 | jsonb_matches_schema(Issue #152 - QUAL-DBT-001 · 20241002215612_troubleshooting_validation.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20241002215612_troubleshooting_validation.sql |
| Location | line 70, col 1, exact |
| Message | Table 'troubleshooting_entries' is hardcoded. Use {{ ref('troubleshooting_entries') }} or {{ source(...) }} instead. |
66 | return true;
67 | end;
68 | $$ language plpgsql;
69 |
>>> 70 | alter table troubleshooting_entries
71 | add constraint troubleshooting_errors_check
72 | check (
73 | validate_troubleshooting_errors(errors)
74 | );Issue #153 - QUAL-DBT-001 · 20241121205753_add_meetups_columns.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20241121205753_add_meetups_columns.sql |
| Location | line 1, col 1, exact |
| Message | Table 'meetups' is hardcoded. Use {{ ref('meetups') }} or {{ source(...) }} instead. |
>>> 1 | alter table public.meetups
2 | add column timezone text;
3 |
4 | alter table public.meetups
5 | add column city text;Issue #154 - QUAL-DBT-002 · 20241121205753_add_meetups_columns.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20241121205753_add_meetups_columns.sql |
| Location | line 1, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
>>> 1 | alter table public.meetups
2 | add column timezone text;
3 |
4 | alter table public.meetups
5 | add column city text;Issue #155 - QUAL-DBT-001 · 20241121205753_add_meetups_columns.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20241121205753_add_meetups_columns.sql |
| Location | line 4, col 1, exact |
| Message | Table 'meetups' is hardcoded. Use {{ ref('meetups') }} or {{ source(...) }} instead. |
1 | alter table public.meetups
2 | add column timezone text;
3 |
>>> 4 | alter table public.meetups
5 | add column city text;Issue #156 - QUAL-DBT-002 · 20241121205753_add_meetups_columns.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20241121205753_add_meetups_columns.sql |
| Location | line 4, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
1 | alter table public.meetups
2 | add column timezone text;
3 |
>>> 4 | alter table public.meetups
5 | add column city text;Issue #157 - QUAL-DEAD-001 · 20250423133137_improve_vector_search.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250423133137_improve_vector_search.sql |
| Location | line 49, col 1, exact |
| Message | Database object 'SEARCH_CONTENT' is defined but never used in the analyzed project. |
45 | )
46 | end;
47 | $$;
48 |
>>> 49 | create or replace function search_content(
50 | embedding vector(1536),
51 | include_full_content boolean default false,
52 | match_threshold float default 0.78,
53 | max_result int default 30Issue #158 - QUAL-DBT-001 · 20250430202653_return_meta_vector_search.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250430202653_return_meta_vector_search.sql |
| Location | line 3, col 1, exact |
| Message | Table 'search_content' is hardcoded. Use {{ ref('search_content') }} or {{ source(...) }} instead. |
1 | -- Alter the search_content function to also return the page metadata
2 |
>>> 3 | drop function search_content;
4 |
5 | create or replace function search_content(
6 | embedding vector(1536),
7 | include_full_content boolean default false,Issue #159 - QUAL-DBT-001 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 1, col 1, exact |
| Message | Table 'error' is hardcoded. Use {{ ref('error') }} or {{ source(...) }} instead. |
>>> 1 | alter table content.error
2 | add column metadata jsonb;
3 |
4 | alter table content.error
5 | add constraint constraint_content_error_metadata_schema check (Issue #160 - QUAL-DBT-002 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 1, col 1, exact |
| Message | Hardcoded schema 'content' found in table reference. |
>>> 1 | alter table content.error
2 | add column metadata jsonb;
3 |
4 | alter table content.error
5 | add constraint constraint_content_error_metadata_schema check (Issue #161 - QUAL-DBT-001 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 4, col 1, exact |
| Message | Table 'error' is hardcoded. Use {{ ref('error') }} or {{ source(...) }} instead. |
1 | alter table content.error
2 | add column metadata jsonb;
3 |
>>> 4 | alter table content.error
5 | add constraint constraint_content_error_metadata_schema check (
6 | jsonb_matches_schema(
7 | '{
8 | "type": "object",Issue #162 - QUAL-DBT-002 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 4, col 1, exact |
| Message | Hardcoded schema 'content' found in table reference. |
1 | alter table content.error
2 | add column metadata jsonb;
3 |
>>> 4 | alter table content.error
5 | add constraint constraint_content_error_metadata_schema check (
6 | jsonb_matches_schema(
7 | '{
8 | "type": "object",Issue #163 - QUAL-DBT-001 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 31, col 1, exact |
| Message | Table 'update_error_code' is hardcoded. Use {{ ref('update_error_code') }} or {{ source(...) }} instead. |
27 | metadata
28 | )
29 | );
30 |
>>> 31 | drop function content.update_error_code;
32 |
33 | -- Recreate function also taking a metadata field
34 | -- See comments for what is new
35 | create function content.update_error_code(Issue #164 - QUAL-DBT-002 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 31, col 1, exact |
| Message | Hardcoded schema 'content' found in table reference. |
27 | metadata
28 | )
29 | );
30 |
>>> 31 | drop function content.update_error_code;
32 |
33 | -- Recreate function also taking a metadata field
34 | -- See comments for what is new
35 | create function content.update_error_code(Issue #165 - QUAL-DBT-001 · 20250529220759_error_code_delete_return_value.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250529220759_error_code_delete_return_value.sql |
| Location | line 1, col 1, exact |
| Message | Table 'delete_error_codes_except' is hardcoded. Use {{ ref('delete_error_codes_except') }} or {{ source(...) }} instead. |
>>> 1 | drop function content.delete_error_codes_except(jsonb);
2 |
3 | -- Recreating function to return the number of rows deleted
4 | create or replace function content.delete_error_codes_except(
5 | skip_codes jsonbIssue #166 - QUAL-DBT-002 · 20250529220759_error_code_delete_return_value.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250529220759_error_code_delete_return_value.sql |
| Location | line 1, col 1, exact |
| Message | Hardcoded schema 'content' found in table reference. |
>>> 1 | drop function content.delete_error_codes_except(jsonb);
2 |
3 | -- Recreating function to return the number of rows deleted
4 | create or replace function content.delete_error_codes_except(
5 | skip_codes jsonbIssue #167 - COST-PAGE-003 · 20250529220759_error_code_delete_return_value.sql
| Field | Value |
|---|---|
| Rule | COST-PAGE-003 |
| Severity | MEDIUM |
| Dimension | cost |
| Subcategory | pagination |
| File | 20250529220759_error_code_delete_return_value.sql |
| Location | line 4, col 1, exact |
| Message | Expensive COUNT(*) for pagination total detected on unfiltered table. |
1 | drop function content.delete_error_codes_except(jsonb);
2 |
3 | -- Recreating function to return the number of rows deleted
>>> 4 | create or replace function content.delete_error_codes_except(
5 | skip_codes jsonb
6 | )
7 | returns integer
8 | set search_path = ''Issue #168 - QUAL-DBT-001 · 20250605201937_error_codes_table_ids.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250605201937_error_codes_table_ids.sql |
| Location | line 3, col 1, exact |
| Message | Table 'error' is hardcoded. Use {{ ref('error') }} or {{ source(...) }} instead. |
1 | -- Add an ID column on the error table. It has a composite primary key but
2 | -- needs an ID column to be able to use it as a foreign key.
>>> 3 | alter table content.error
4 | add column id uuid unique not null default gen_random_uuid();
5 |
6 | grant select (id)
7 | on content.errorIssue #169 - QUAL-DBT-002 · 20250605201937_error_codes_table_ids.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250605201937_error_codes_table_ids.sql |
| Location | line 3, col 1, exact |
| Message | Hardcoded schema 'content' found in table reference. |
1 | -- Add an ID column on the error table. It has a composite primary key but
2 | -- needs an ID column to be able to use it as a foreign key.
>>> 3 | alter table content.error
4 | add column id uuid unique not null default gen_random_uuid();
5 |
6 | grant select (id)
7 | on content.errorIssue #170 - QUAL-DEAD-001 · 20250714120000_hybrid_search.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250714120000_hybrid_search.sql |
| Location | line 2, col 1, exact |
| Message | Database object 'SEARCH_CONTENT_HYBRID' is defined but never used in the analyzed project. |
1 | -- Hybrid search: combines FTS and vector search using reciprocal rank fusion (RRF)
>>> 2 | create or replace function search_content_hybrid(
3 | query_text text,
4 | query_embedding vector(1536),
5 | max_result int default 30,
6 | full_text_weight float default 1,Issue #171 - QUAL-DBT-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 34, col 1, exact |
| Message | Table 'page_section_nimbus' is hardcoded. Use {{ ref('page_section_nimbus') }} or {{ source(...) }} instead. |
30 | for select
31 | to authenticated
32 | using (true);
33 |
>>> 34 | create table "public"."page_section_nimbus" (
35 | id bigint primary key generated always as identity,
36 | page_id bigint not null references public.page_nimbus (id) on delete cascade,
37 | content text,
38 | token_count int,Issue #172 - QUAL-DBT-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 34, col 1, exact |
| Message | Table 'page_nimbus' is hardcoded. Use {{ ref('page_nimbus') }} or {{ source(...) }} instead. |
30 | for select
31 | to authenticated
32 | using (true);
33 |
>>> 34 | create table "public"."page_section_nimbus" (
35 | id bigint primary key generated always as identity,
36 | page_id bigint not null references public.page_nimbus (id) on delete cascade,
37 | content text,
38 | token_count int,Issue #173 - QUAL-DBT-002 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 34, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
30 | for select
31 | to authenticated
32 | using (true);
33 |
>>> 34 | create table "public"."page_section_nimbus" (
35 | id bigint primary key generated always as identity,
36 | page_id bigint not null references public.page_nimbus (id) on delete cascade,
37 | content text,
38 | token_count int,Issue #174 - QUAL-DBT-002 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 34, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
30 | for select
31 | to authenticated
32 | using (true);
33 |
>>> 34 | create table "public"."page_section_nimbus" (
35 | id bigint primary key generated always as identity,
36 | page_id bigint not null references public.page_nimbus (id) on delete cascade,
37 | content text,
38 | token_count int,Issue #175 - QUAL-SCHEMA-002 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-SCHEMA-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | schema_design |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 34, col 1, exact |
| Message | Column 'page_id' looks like a foreign key but lacks a constraint |
30 | for select
31 | to authenticated
32 | using (true);
33 |
>>> 34 | create table "public"."page_section_nimbus" (
35 | id bigint primary key generated always as identity,
36 | page_id bigint not null references public.page_nimbus (id) on delete cascade,
37 | content text,
38 | token_count int,Issue #176 - QUAL-DEAD-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 34, col 1, exact |
| Message | Database object 'PAGE_SECTION_NIMBUS' is defined but never used in the analyzed project. |
30 | for select
31 | to authenticated
32 | using (true);
33 |
>>> 34 | create table "public"."page_section_nimbus" (
35 | id bigint primary key generated always as identity,
36 | page_id bigint not null references public.page_nimbus (id) on delete cascade,
37 | content text,
38 | token_count int,Issue #177 - QUAL-DBT-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 61, col 1, exact |
| Message | Table 'page_nimbus' is hardcoded. Use {{ ref('page_nimbus') }} or {{ source(...) }} instead. |
57 | to authenticated
58 | using (true);
59 |
60 | -- Create indexes for nimbus tables (matching the regular tables)
>>> 61 | create index fts_search_index_content_nimbus
62 | on page_nimbus
63 | using gin(fts_tokens);
64 |
65 | create index fts_search_index_title_nimbusIssue #178 - QUAL-DEAD-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 61, col 1, exact |
| Message | Database object 'FTS_SEARCH_INDEX_CONTENT_NIMBUS' is defined but never used in the analyzed project. |
57 | to authenticated
58 | using (true);
59 |
60 | -- Create indexes for nimbus tables (matching the regular tables)
>>> 61 | create index fts_search_index_content_nimbus
62 | on page_nimbus
63 | using gin(fts_tokens);
64 |
65 | create index fts_search_index_title_nimbusIssue #179 - QUAL-DBT-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 65, col 1, exact |
| Message | Table 'page_nimbus' is hardcoded. Use {{ ref('page_nimbus') }} or {{ source(...) }} instead. |
61 | create index fts_search_index_content_nimbus
62 | on page_nimbus
63 | using gin(fts_tokens);
64 |
>>> 65 | create index fts_search_index_title_nimbus
66 | on page_nimbus
67 | using gin(title_tokens);
68 |
69 | -- Create search function for nimbus tables (FTS search)Issue #180 - QUAL-DEAD-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 65, col 1, exact |
| Message | Database object 'FTS_SEARCH_INDEX_TITLE_NIMBUS' is defined but never used in the analyzed project. |
61 | create index fts_search_index_content_nimbus
62 | on page_nimbus
63 | using gin(fts_tokens);
64 |
>>> 65 | create index fts_search_index_title_nimbus
66 | on page_nimbus
67 | using gin(title_tokens);
68 |
69 | -- Create search function for nimbus tables (FTS search)Issue #181 - QUAL-DEAD-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 126, col 1, exact |
| Message | Database object 'SEARCH_CONTENT_HYBRID_NIMBUS' is defined but never used in the analyzed project. |
122 | end;
123 | $$;
124 |
125 | -- Create hybrid search function for nimbus tables
>>> 126 | create or replace function search_content_hybrid_nimbus(
127 | query_text text,
128 | query_embedding vector(1536),
129 | max_result int default 30,
130 | full_text_weight float default 1,Issue #182 - QUAL-DEAD-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 225, col 1, exact |
| Message | Database object 'DOCS_SEARCH_EMBEDDINGS_NIMBUS' is defined but never used in the analyzed project. |
221 | order by page_section_nimbus.embedding operator(public.<#>) embedding;
222 | end;
223 | $$;
224 |
>>> 225 | create or replace function docs_search_embeddings_nimbus(
226 | embedding vector(1536),
227 | match_threshold float
228 | )
229 | returns table (Issue #183 - QUAL-DEAD-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 273, col 1, exact |
| Message | Database object 'SEARCH_CONTENT_NIMBUS' is defined but never used in the analyzed project. |
269 | group by page_nimbus.id;
270 | end;
271 | $$;
272 |
>>> 273 | create or replace function search_content_nimbus(
274 | embedding vector(1536),
275 | include_full_content boolean default false,
276 | match_threshold float default 0.78,
277 | max_result int default 30Issue #184 - QUAL-DBT-001 · 20260218202528_status_cache.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20260218202528_status_cache.sql |
| Location | line 16, col 1, exact |
| Message | Table 'incident_status_cache' is hardcoded. Use {{ ref('incident_status_cache') }} or {{ source(...) }} instead. |
12 |
13 | revoke all on public.incident_status_cache from anon;
14 | revoke all on public.incident_status_cache from authenticated;
15 |
>>> 16 | create index if not exists idx_incident_status_cache_incident_id
17 | on public.incident_status_cache (incident_id);
18 |
19 | create index if not exists idx_incident_status_cache_shortlink
20 | on public.incident_status_cache (shortlink);Issue #185 - QUAL-DBT-002 · 20260218202528_status_cache.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20260218202528_status_cache.sql |
| Location | line 16, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
12 |
13 | revoke all on public.incident_status_cache from anon;
14 | revoke all on public.incident_status_cache from authenticated;
15 |
>>> 16 | create index if not exists idx_incident_status_cache_incident_id
17 | on public.incident_status_cache (incident_id);
18 |
19 | create index if not exists idx_incident_status_cache_shortlink
20 | on public.incident_status_cache (shortlink);Issue #186 - QUAL-DEAD-001 · 20260218202528_status_cache.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20260218202528_status_cache.sql |
| Location | line 16, col 1, exact |
| Message | Database object 'IDX_INCIDENT_STATUS_CACHE_INCIDENT_ID' is defined but never used in the analyzed project. |
12 |
13 | revoke all on public.incident_status_cache from anon;
14 | revoke all on public.incident_status_cache from authenticated;
15 |
>>> 16 | create index if not exists idx_incident_status_cache_incident_id
17 | on public.incident_status_cache (incident_id);
18 |
19 | create index if not exists idx_incident_status_cache_shortlink
20 | on public.incident_status_cache (shortlink);Issue #187 - QUAL-DBT-001 · 20260218202528_status_cache.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20260218202528_status_cache.sql |
| Location | line 19, col 1, exact |
| Message | Table 'incident_status_cache' is hardcoded. Use {{ ref('incident_status_cache') }} or {{ source(...) }} instead. |
15 |
16 | create index if not exists idx_incident_status_cache_incident_id
17 | on public.incident_status_cache (incident_id);
18 |
>>> 19 | create index if not exists idx_incident_status_cache_shortlink
20 | on public.incident_status_cache (shortlink);
21 |
22 | create or replace function public.set_updated_at()
23 | returns triggerIssue #188 - QUAL-DBT-002 · 20260218202528_status_cache.sql
| Field | Value |
|---|---|
| Rule | QUAL-DBT-002 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | modern-sql |
| File | 20260218202528_status_cache.sql |
| Location | line 19, col 1, exact |
| Message | Hardcoded schema 'public' found in table reference. |
15 |
16 | create index if not exists idx_incident_status_cache_incident_id
17 | on public.incident_status_cache (incident_id);
18 |
>>> 19 | create index if not exists idx_incident_status_cache_shortlink
20 | on public.incident_status_cache (shortlink);
21 |
22 | create or replace function public.set_updated_at()
23 | returns triggerIssue #189 - QUAL-DEAD-001 · 20260218202528_status_cache.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-001 |
| Severity | MEDIUM |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20260218202528_status_cache.sql |
| Location | line 19, col 1, exact |
| Message | Database object 'IDX_INCIDENT_STATUS_CACHE_SHORTLINK' is defined but never used in the analyzed project. |
15 |
16 | create index if not exists idx_incident_status_cache_incident_id
17 | on public.incident_status_cache (incident_id);
18 |
>>> 19 | create index if not exists idx_incident_status_cache_shortlink
20 | on public.incident_status_cache (shortlink);
21 |
22 | create or replace function public.set_updated_at()
23 | returns triggerLow — 95 issues
Issue #190 - COST-COMPRESS-001 · 20230126220613_doc_embeddings.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20230126220613_doc_embeddings.sql |
| Location | line 3, col 1, exact |
| Message | Large text column without compression detected: create table "public"."page" ( id bigserial primary key, path text not null unique, checksum text |
1 | create extension if not exists vector with schema public;
2 |
>>> 3 | create table "public"."page" (
4 | id bigserial primary key,
5 | path text not null unique,
6 | checksum text,
7 | meta jsonbIssue #191 - COST-COMPRESS-001 · 20230126220613_doc_embeddings.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20230126220613_doc_embeddings.sql |
| Location | line 10, col 1, exact |
| Message | Large text column without compression detected: create table "public"."page_section" ( id bigserial primary key, page_id bigint not null references public.page on delete cascade, content text |
6 | checksum text,
7 | meta jsonb
8 | );
9 |
>>> 10 | create table "public"."page_section" (
11 | id bigserial primary key,
12 | page_id bigint not null references public.page on delete cascade,
13 | content text,
14 | token_count int,Issue #192 - QUAL-DEAD-003 · 20230217032716_page_hierarchy_function.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20230217032716_page_hierarchy_function.sql |
| Location | line 53, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 2 times in project. |
49 | join chain on chain.parent_page_id = child.id
50 | )
51 | select id, parent_page_id, path, meta
52 | from chain;
>>> 53 | $$;Issue #193 - QUAL-DEAD-003 · 20231121164837_modify_search_functions.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20231121164837_modify_search_functions.sql |
| Location | line 88, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 2 times in project. |
84 | from page
85 | join match on match.page_id = page.id
86 | group by page.id;
87 | end;
>>> 88 | $$;Issue #194 - QUAL-NAME-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | QUAL-NAME-001 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | naming |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 12, col 1, exact |
| Message | Inconsistent table naming detected: mixed singular (page_section) and plural (fts_tokens) names |
8 | -- search term frequency on that page
9 |
10 | drop index fts_search_index;
11 |
>>> 12 | alter table page_section
13 | drop column fts_tokens;
14 |
15 | alter table page
16 | add column content text;Issue #195 - COST-COMPRESS-001 · 20240208001120_add_feedback_table.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20240208001120_add_feedback_table.sql |
| Location | line 6, col 1, exact |
| Message | Large text column without compression detected: create table feedback ( id bigint primary key generated always as identity, date_created date not null default current_date, vote feedback_vote not null, page text |
2 | 'yes',
3 | 'no'
4 | );
5 |
>>> 6 | create table feedback (
7 | id bigint primary key generated always as identity,
8 | date_created date not null default current_date,
9 | vote feedback_vote not null,
10 | page text not nullIssue #196 - QUAL-TEST-001 · 20240604035404_last_changed.sql
| Field | Value |
|---|---|
| Rule | QUAL-TEST-001 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | testing |
| File | 20240604035404_last_changed.sql |
| Location | line 1, col 1, exact |
| Message | Non-deterministic function 'NOW' detected - makes testing difficult |
>>> 1 | create table last_changed (
2 | id bigint primary key generated always as identity,
3 | checksum text not null,
4 | parent_page text not null,
5 | heading text not null,Issue #197 - QUAL-TEST-001 · 20240604035404_last_changed.sql
| Field | Value |
|---|---|
| Rule | QUAL-TEST-001 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | testing |
| File | 20240604035404_last_changed.sql |
| Location | line 1, col 1, exact |
| Message | Non-deterministic function 'NOW' detected - makes testing difficult |
>>> 1 | create table last_changed (
2 | id bigint primary key generated always as identity,
3 | checksum text not null,
4 | parent_page text not null,
5 | heading text not null,Issue #198 - COST-COMPRESS-001 · 20240604035404_last_changed.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20240604035404_last_changed.sql |
| Location | line 1, col 1, exact |
| Message | Large text column without compression detected: create table last_changed ( id bigint primary key generated always as identity, checksum text not null, parent_page text not null, heading text |
>>> 1 | create table last_changed (
2 | id bigint primary key generated always as identity,
3 | checksum text not null,
4 | parent_page text not null,
5 | heading text not null,Issue #199 - QUAL-DEAD-003 · 20240604035404_last_changed.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240604035404_last_changed.sql |
| Location | line 25, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 2 times in project. |
21 |
22 | alter table last_changed enable row level security;
23 |
24 | revoke all on last_changed from anon;
>>> 25 | revoke all on last_changed from authenticated;
26 |
27 | create index idx_last_changed_parent_page_btree
28 | on last_changed (parent_page);Issue #200 - QUAL-NAME-003 · 20240604035404_last_changed.sql
| Field | Value |
|---|---|
| Rule | QUAL-NAME-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | naming |
| File | 20240604035404_last_changed.sql |
| Location | line 27, col 1, exact |
| Message | Pattern matched: idx_last_changed_parent_page_btree |
23 |
24 | revoke all on last_changed from anon;
25 | revoke all on last_changed from authenticated;
26 |
>>> 27 | create index idx_last_changed_parent_page_btree
28 | on last_changed (parent_page);Issue #201 - QUAL-DEAD-003 · 20240605171314_last_changed_update.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240605171314_last_changed_update.sql |
| Location | line 79, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 2 times in project. |
75 | as $$
76 | declare
77 | newest_check_time timestamp with time zone;
78 | number_deleted integer;
>>> 79 | begin
80 | select last_checked into newest_check_time
81 | from public.last_changed
82 | order by last_checked desc
83 | limit 1Issue #202 - QUAL-DEAD-003 · 20240605171314_last_changed_update.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240605171314_last_changed_update.sql |
| Location | line 97, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 2 times in project. |
93 | into number_deleted;
94 |
95 | return number_deleted;
96 | end;
>>> 97 | $$
98 | ;
99 |
100 | revoke all on function public.cleanup_last_changed_pages
101 | from public, anon, authenticated;Issue #203 - QUAL-DEAD-003 · 20240605171314_last_changed_update.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240605171314_last_changed_update.sql |
| Location | line 100, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 2 times in project. |
96 | end;
97 | $$
98 | ;
99 |
>>> 100 | revoke all on function public.cleanup_last_changed_pages
101 | from public, anon, authenticated;Issue #204 - QUAL-DEAD-003 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 113, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 3 times in project. |
109 | from public.page
110 | join match on match.page_id = page.id
111 | group by page.id;
112 | end;
>>> 113 | $$;
114 |
115 | create or replace function docs_search_fts(query text)
116 | returns table (
117 | id int8,Issue #205 - QUAL-DEAD-003 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 147, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 3 times in project. |
143 | ts_rank(fts_tokens, websearch_to_tsquery(query))
144 | ) desc
145 | limit 10;
146 | end;
>>> 147 | $$;
148 |
149 | drop function public.match_page_sections;
150 |
151 | drop function public.get_page_parents;Issue #206 - COST-COMPRESS-001 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20240722100743_remote_schema.sql |
| Location | line 1, col 1, exact |
| Message | Large text column without compression detected: create table "public"."active_pgbouncer_projects" ( "id" bigint generated by default as identity not null, "project_ref" text |
>>> 1 | create table "public"."active_pgbouncer_projects" (
2 | "id" bigint generated by default as identity not null,
3 | "project_ref" text
4 | );
5 | Issue #207 - COST-COMPRESS-001 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20240722100743_remote_schema.sql |
| Location | line 9, col 1, exact |
| Message | Large text column without compression detected: create table "public"."vercel_project_connections_without_supavisor" ( "id" bigint generated by default as identity not null, "project_ref" text |
5 |
6 |
7 | alter table "public"."active_pgbouncer_projects" enable row level security;
8 |
>>> 9 | create table "public"."vercel_project_connections_without_supavisor" (
10 | "id" bigint generated by default as identity not null,
11 | "project_ref" text not null
12 | );
13 | Issue #208 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 27, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
23 | alter table "public"."vercel_project_connections_without_supavisor" add constraint "vercel_project_connections_without_supavisor_pkey" PRIMARY KEY using index "vercel_project_connections_without_supavisor_pkey";
24 |
25 | grant delete on table "public"."active_pgbouncer_projects" to "anon";
26 |
>>> 27 | grant insert on table "public"."active_pgbouncer_projects" to "anon";
28 |
29 | grant references on table "public"."active_pgbouncer_projects" to "anon";
30 |
31 | grant select on table "public"."active_pgbouncer_projects" to "anon";Issue #209 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 29, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
25 | grant delete on table "public"."active_pgbouncer_projects" to "anon";
26 |
27 | grant insert on table "public"."active_pgbouncer_projects" to "anon";
28 |
>>> 29 | grant references on table "public"."active_pgbouncer_projects" to "anon";
30 |
31 | grant select on table "public"."active_pgbouncer_projects" to "anon";
32 |
33 | grant trigger on table "public"."active_pgbouncer_projects" to "anon";Issue #210 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 31, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
27 | grant insert on table "public"."active_pgbouncer_projects" to "anon";
28 |
29 | grant references on table "public"."active_pgbouncer_projects" to "anon";
30 |
>>> 31 | grant select on table "public"."active_pgbouncer_projects" to "anon";
32 |
33 | grant trigger on table "public"."active_pgbouncer_projects" to "anon";
34 |
35 | grant truncate on table "public"."active_pgbouncer_projects" to "anon";Issue #211 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 33, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
29 | grant references on table "public"."active_pgbouncer_projects" to "anon";
30 |
31 | grant select on table "public"."active_pgbouncer_projects" to "anon";
32 |
>>> 33 | grant trigger on table "public"."active_pgbouncer_projects" to "anon";
34 |
35 | grant truncate on table "public"."active_pgbouncer_projects" to "anon";
36 |
37 | grant update on table "public"."active_pgbouncer_projects" to "anon";Issue #212 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 35, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
31 | grant select on table "public"."active_pgbouncer_projects" to "anon";
32 |
33 | grant trigger on table "public"."active_pgbouncer_projects" to "anon";
34 |
>>> 35 | grant truncate on table "public"."active_pgbouncer_projects" to "anon";
36 |
37 | grant update on table "public"."active_pgbouncer_projects" to "anon";
38 |
39 | grant delete on table "public"."active_pgbouncer_projects" to "authenticated";Issue #213 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 37, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
33 | grant trigger on table "public"."active_pgbouncer_projects" to "anon";
34 |
35 | grant truncate on table "public"."active_pgbouncer_projects" to "anon";
36 |
>>> 37 | grant update on table "public"."active_pgbouncer_projects" to "anon";
38 |
39 | grant delete on table "public"."active_pgbouncer_projects" to "authenticated";
40 |
41 | grant insert on table "public"."active_pgbouncer_projects" to "authenticated";Issue #214 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 39, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
35 | grant truncate on table "public"."active_pgbouncer_projects" to "anon";
36 |
37 | grant update on table "public"."active_pgbouncer_projects" to "anon";
38 |
>>> 39 | grant delete on table "public"."active_pgbouncer_projects" to "authenticated";
40 |
41 | grant insert on table "public"."active_pgbouncer_projects" to "authenticated";
42 |
43 | grant references on table "public"."active_pgbouncer_projects" to "authenticated";Issue #215 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 41, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
37 | grant update on table "public"."active_pgbouncer_projects" to "anon";
38 |
39 | grant delete on table "public"."active_pgbouncer_projects" to "authenticated";
40 |
>>> 41 | grant insert on table "public"."active_pgbouncer_projects" to "authenticated";
42 |
43 | grant references on table "public"."active_pgbouncer_projects" to "authenticated";
44 |
45 | grant select on table "public"."active_pgbouncer_projects" to "authenticated";Issue #216 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 43, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
39 | grant delete on table "public"."active_pgbouncer_projects" to "authenticated";
40 |
41 | grant insert on table "public"."active_pgbouncer_projects" to "authenticated";
42 |
>>> 43 | grant references on table "public"."active_pgbouncer_projects" to "authenticated";
44 |
45 | grant select on table "public"."active_pgbouncer_projects" to "authenticated";
46 |
47 | grant trigger on table "public"."active_pgbouncer_projects" to "authenticated";Issue #217 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 45, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
41 | grant insert on table "public"."active_pgbouncer_projects" to "authenticated";
42 |
43 | grant references on table "public"."active_pgbouncer_projects" to "authenticated";
44 |
>>> 45 | grant select on table "public"."active_pgbouncer_projects" to "authenticated";
46 |
47 | grant trigger on table "public"."active_pgbouncer_projects" to "authenticated";
48 |
49 | grant truncate on table "public"."active_pgbouncer_projects" to "authenticated";Issue #218 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 47, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
43 | grant references on table "public"."active_pgbouncer_projects" to "authenticated";
44 |
45 | grant select on table "public"."active_pgbouncer_projects" to "authenticated";
46 |
>>> 47 | grant trigger on table "public"."active_pgbouncer_projects" to "authenticated";
48 |
49 | grant truncate on table "public"."active_pgbouncer_projects" to "authenticated";
50 |
51 | grant update on table "public"."active_pgbouncer_projects" to "authenticated";Issue #219 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 49, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
45 | grant select on table "public"."active_pgbouncer_projects" to "authenticated";
46 |
47 | grant trigger on table "public"."active_pgbouncer_projects" to "authenticated";
48 |
>>> 49 | grant truncate on table "public"."active_pgbouncer_projects" to "authenticated";
50 |
51 | grant update on table "public"."active_pgbouncer_projects" to "authenticated";
52 |
53 | grant delete on table "public"."active_pgbouncer_projects" to "service_role";Issue #220 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 51, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
47 | grant trigger on table "public"."active_pgbouncer_projects" to "authenticated";
48 |
49 | grant truncate on table "public"."active_pgbouncer_projects" to "authenticated";
50 |
>>> 51 | grant update on table "public"."active_pgbouncer_projects" to "authenticated";
52 |
53 | grant delete on table "public"."active_pgbouncer_projects" to "service_role";
54 |
55 | grant insert on table "public"."active_pgbouncer_projects" to "service_role";Issue #221 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 53, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
49 | grant truncate on table "public"."active_pgbouncer_projects" to "authenticated";
50 |
51 | grant update on table "public"."active_pgbouncer_projects" to "authenticated";
52 |
>>> 53 | grant delete on table "public"."active_pgbouncer_projects" to "service_role";
54 |
55 | grant insert on table "public"."active_pgbouncer_projects" to "service_role";
56 |
57 | grant references on table "public"."active_pgbouncer_projects" to "service_role";Issue #222 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 55, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
51 | grant update on table "public"."active_pgbouncer_projects" to "authenticated";
52 |
53 | grant delete on table "public"."active_pgbouncer_projects" to "service_role";
54 |
>>> 55 | grant insert on table "public"."active_pgbouncer_projects" to "service_role";
56 |
57 | grant references on table "public"."active_pgbouncer_projects" to "service_role";
58 |
59 | grant select on table "public"."active_pgbouncer_projects" to "service_role";Issue #223 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 57, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
53 | grant delete on table "public"."active_pgbouncer_projects" to "service_role";
54 |
55 | grant insert on table "public"."active_pgbouncer_projects" to "service_role";
56 |
>>> 57 | grant references on table "public"."active_pgbouncer_projects" to "service_role";
58 |
59 | grant select on table "public"."active_pgbouncer_projects" to "service_role";
60 |
61 | grant trigger on table "public"."active_pgbouncer_projects" to "service_role";Issue #224 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 59, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
55 | grant insert on table "public"."active_pgbouncer_projects" to "service_role";
56 |
57 | grant references on table "public"."active_pgbouncer_projects" to "service_role";
58 |
>>> 59 | grant select on table "public"."active_pgbouncer_projects" to "service_role";
60 |
61 | grant trigger on table "public"."active_pgbouncer_projects" to "service_role";
62 |
63 | grant truncate on table "public"."active_pgbouncer_projects" to "service_role";Issue #225 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 61, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
57 | grant references on table "public"."active_pgbouncer_projects" to "service_role";
58 |
59 | grant select on table "public"."active_pgbouncer_projects" to "service_role";
60 |
>>> 61 | grant trigger on table "public"."active_pgbouncer_projects" to "service_role";
62 |
63 | grant truncate on table "public"."active_pgbouncer_projects" to "service_role";
64 |
65 | grant update on table "public"."active_pgbouncer_projects" to "service_role";Issue #226 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 63, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
59 | grant select on table "public"."active_pgbouncer_projects" to "service_role";
60 |
61 | grant trigger on table "public"."active_pgbouncer_projects" to "service_role";
62 |
>>> 63 | grant truncate on table "public"."active_pgbouncer_projects" to "service_role";
64 |
65 | grant update on table "public"."active_pgbouncer_projects" to "service_role";
66 |
67 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "anon";Issue #227 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 65, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
61 | grant trigger on table "public"."active_pgbouncer_projects" to "service_role";
62 |
63 | grant truncate on table "public"."active_pgbouncer_projects" to "service_role";
64 |
>>> 65 | grant update on table "public"."active_pgbouncer_projects" to "service_role";
66 |
67 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "anon";
68 |
69 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "anon";Issue #228 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 67, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
63 | grant truncate on table "public"."active_pgbouncer_projects" to "service_role";
64 |
65 | grant update on table "public"."active_pgbouncer_projects" to "service_role";
66 |
>>> 67 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "anon";
68 |
69 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "anon";
70 |
71 | grant references on table "public"."vercel_project_connections_without_supavisor" to "anon";Issue #229 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 69, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
65 | grant update on table "public"."active_pgbouncer_projects" to "service_role";
66 |
67 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "anon";
68 |
>>> 69 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "anon";
70 |
71 | grant references on table "public"."vercel_project_connections_without_supavisor" to "anon";
72 |
73 | grant select on table "public"."vercel_project_connections_without_supavisor" to "anon";Issue #230 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 71, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
67 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "anon";
68 |
69 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "anon";
70 |
>>> 71 | grant references on table "public"."vercel_project_connections_without_supavisor" to "anon";
72 |
73 | grant select on table "public"."vercel_project_connections_without_supavisor" to "anon";
74 |
75 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "anon";Issue #231 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 73, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
69 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "anon";
70 |
71 | grant references on table "public"."vercel_project_connections_without_supavisor" to "anon";
72 |
>>> 73 | grant select on table "public"."vercel_project_connections_without_supavisor" to "anon";
74 |
75 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "anon";
76 |
77 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "anon";Issue #232 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 75, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
71 | grant references on table "public"."vercel_project_connections_without_supavisor" to "anon";
72 |
73 | grant select on table "public"."vercel_project_connections_without_supavisor" to "anon";
74 |
>>> 75 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "anon";
76 |
77 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "anon";
78 |
79 | grant update on table "public"."vercel_project_connections_without_supavisor" to "anon";Issue #233 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 77, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
73 | grant select on table "public"."vercel_project_connections_without_supavisor" to "anon";
74 |
75 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "anon";
76 |
>>> 77 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "anon";
78 |
79 | grant update on table "public"."vercel_project_connections_without_supavisor" to "anon";
80 |
81 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "authenticated";Issue #234 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 79, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
75 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "anon";
76 |
77 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "anon";
78 |
>>> 79 | grant update on table "public"."vercel_project_connections_without_supavisor" to "anon";
80 |
81 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
82 |
83 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "authenticated";Issue #235 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 81, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
77 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "anon";
78 |
79 | grant update on table "public"."vercel_project_connections_without_supavisor" to "anon";
80 |
>>> 81 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
82 |
83 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
84 |
85 | grant references on table "public"."vercel_project_connections_without_supavisor" to "authenticated";Issue #236 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 83, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
79 | grant update on table "public"."vercel_project_connections_without_supavisor" to "anon";
80 |
81 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
82 |
>>> 83 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
84 |
85 | grant references on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
86 |
87 | grant select on table "public"."vercel_project_connections_without_supavisor" to "authenticated";Issue #237 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 85, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
81 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
82 |
83 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
84 |
>>> 85 | grant references on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
86 |
87 | grant select on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
88 |
89 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "authenticated";Issue #238 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 87, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
83 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
84 |
85 | grant references on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
86 |
>>> 87 | grant select on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
88 |
89 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
90 |
91 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "authenticated";Issue #239 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 89, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
85 | grant references on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
86 |
87 | grant select on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
88 |
>>> 89 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
90 |
91 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
92 |
93 | grant update on table "public"."vercel_project_connections_without_supavisor" to "authenticated";Issue #240 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 91, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
87 | grant select on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
88 |
89 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
90 |
>>> 91 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
92 |
93 | grant update on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
94 |
95 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "service_role";Issue #241 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 93, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
89 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
90 |
91 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
92 |
>>> 93 | grant update on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
94 |
95 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "service_role";
96 |
97 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "service_role";Issue #242 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 95, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
91 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
92 |
93 | grant update on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
94 |
>>> 95 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "service_role";
96 |
97 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "service_role";
98 |
99 | grant references on table "public"."vercel_project_connections_without_supavisor" to "service_role";Issue #243 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 97, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
93 | grant update on table "public"."vercel_project_connections_without_supavisor" to "authenticated";
94 |
95 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "service_role";
96 |
>>> 97 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "service_role";
98 |
99 | grant references on table "public"."vercel_project_connections_without_supavisor" to "service_role";
100 |
101 | grant select on table "public"."vercel_project_connections_without_supavisor" to "service_role";Issue #244 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 99, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
95 | grant delete on table "public"."vercel_project_connections_without_supavisor" to "service_role";
96 |
97 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "service_role";
98 |
>>> 99 | grant references on table "public"."vercel_project_connections_without_supavisor" to "service_role";
100 |
101 | grant select on table "public"."vercel_project_connections_without_supavisor" to "service_role";
102 |
103 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "service_role";Issue #245 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 101, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
97 | grant insert on table "public"."vercel_project_connections_without_supavisor" to "service_role";
98 |
99 | grant references on table "public"."vercel_project_connections_without_supavisor" to "service_role";
100 |
>>> 101 | grant select on table "public"."vercel_project_connections_without_supavisor" to "service_role";
102 |
103 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "service_role";
104 |
105 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "service_role";Issue #246 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 103, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
99 | grant references on table "public"."vercel_project_connections_without_supavisor" to "service_role";
100 |
101 | grant select on table "public"."vercel_project_connections_without_supavisor" to "service_role";
102 |
>>> 103 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "service_role";
104 |
105 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "service_role";
106 |
107 | grant update on table "public"."vercel_project_connections_without_supavisor" to "service_role";Issue #247 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 105, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
101 | grant select on table "public"."vercel_project_connections_without_supavisor" to "service_role";
102 |
103 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "service_role";
104 |
>>> 105 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "service_role";
106 |
107 | grant update on table "public"."vercel_project_connections_without_supavisor" to "service_role";
108 |
109 | Issue #248 - QUAL-DEAD-003 · 20240722100743_remote_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240722100743_remote_schema.sql |
| Location | line 107, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 42 times in project. |
103 | grant trigger on table "public"."vercel_project_connections_without_supavisor" to "service_role";
104 |
105 | grant truncate on table "public"."vercel_project_connections_without_supavisor" to "service_role";
106 |
>>> 107 | grant update on table "public"."vercel_project_connections_without_supavisor" to "service_role";
108 |
109 | Issue #249 - QUAL-NAME-001 · 20240723131601_drop_unused_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-NAME-001 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | naming |
| File | 20240723131601_drop_unused_tables.sql |
| Location | line 1, col 1, exact |
| Message | Inconsistent table naming detected: mixed singular (active_pgbouncer_projects_pkey) and plural (active_pgbouncer_projects) names |
>>> 1 | alter table "public"."active_pgbouncer_projects" drop constraint "active_pgbouncer_projects_pkey";
2 | alter table "public"."vercel_project_connections_without_supavisor" drop constraint "vercel_project_connections_without_supavisor_pkey";
3 | drop index if exists "public"."active_pgbouncer_projects_pkey";
4 | drop index if exists "public"."vercel_project_connections_without_supavisor_pkey";
5 | drop table "public"."active_pgbouncer_projects";Issue #250 - COST-COMPRESS-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 3, col 1, exact |
| Message | Large text column without compression detected: create table public.launch_weeks ( id text not null primary key, -- 'lw12', 'lw13', etc created_at timestamp with time zone not null default timezone ('utc'::text |
1 | create extension if not exists "uuid-ossp";
2 |
>>> 3 | create table public.launch_weeks (
4 | id text not null primary key, -- 'lw12', 'lw13', etc
5 | created_at timestamp with time zone not null default timezone ('utc'::text, now()),
6 | start_date timestamp with time zone null,
7 | end_date timestamp with time zone nullIssue #251 - COST-COMPRESS-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 20, col 1, exact |
| Message | Large text column without compression detected: create table public.tickets ( id uuid not null default uuid_generate_v4(), created_at timestamp with time zone not null default timezone('utc'::text, now()), launch_week text not null references public.launch_weeks (id), user_id uuid not null references auth.users (id), email text null, name text null, username text null, referred_by text null, shared_on_twitter timestamp with time zone null, shared_on_link |
16 | using ( true );
17 |
18 | insert into public.launch_weeks (id) values ('lw12');
19 |
>>> 20 | create table
21 | public.tickets (
22 | id uuid not null default uuid_generate_v4(),
23 | created_at timestamp with time zone not null default timezone('utc'::text, now()),
24 | launch_week text not null references public.launch_weeks (id),Issue #252 - QUAL-DEAD-003 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 49, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 3 times in project. |
45 | alter table public.tickets enable row level security;
46 | alter publication supabase_realtime add table public.tickets;
47 |
48 | GRANT UPDATE (role) ON TABLE public.tickets TO authenticated;
>>> 49 | GRANT UPDATE (company) ON TABLE public.tickets TO authenticated;
50 | GRANT UPDATE (location) ON TABLE public.tickets TO authenticated;
51 |
52 | create policy "Allow user to select own ticket"
53 | on public.ticketsIssue #253 - QUAL-DEAD-003 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 50, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 3 times in project. |
46 | alter publication supabase_realtime add table public.tickets;
47 |
48 | GRANT UPDATE (role) ON TABLE public.tickets TO authenticated;
49 | GRANT UPDATE (company) ON TABLE public.tickets TO authenticated;
>>> 50 | GRANT UPDATE (location) ON TABLE public.tickets TO authenticated;
51 |
52 | create policy "Allow user to select own ticket"
53 | on public.tickets
54 | as PERMISSIVEIssue #254 - PERF-IDX-009 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | PERF-IDX-009 |
| Severity | LOW |
| Dimension | performance |
| Subcategory | index |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | NOT condition may prevent efficient index usage |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #255 - PERF-IDX-009 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | PERF-IDX-009 |
| Severity | LOW |
| Dimension | performance |
| Subcategory | index |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | NOT condition may prevent efficient index usage |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #256 - PERF-IDX-009 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | PERF-IDX-009 |
| Severity | LOW |
| Dimension | performance |
| Subcategory | index |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | NOT condition may prevent efficient index usage |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #257 - PERF-IDX-009 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | PERF-IDX-009 |
| Severity | LOW |
| Dimension | performance |
| Subcategory | index |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | NOT condition may prevent efficient index usage |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #258 - QUAL-NAME-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-NAME-001 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | naming |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Inconsistent table naming detected: mixed singular (tickets_view) and plural (tickets) names |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #259 - COST-ARCHIVE-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | COST-ARCHIVE-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | archival |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 75, col 1, exact |
| Message | Query on table with timestamp - consider archiving old data to reduce storage costs |
71 | to authenticated
72 | with check (user_id = auth.uid());
73 |
74 | -- public view without sensible data
>>> 75 | create or replace view
76 | public.tickets_view with (security_invoker=on) as
77 | with
78 | lw12_referrals as (
79 | selectIssue #260 - QUAL-TEST-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | QUAL-TEST-001 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | testing |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 120, col 1, exact |
| Message | Non-deterministic function 'NOW' detected - makes testing difficult |
116 | tickets
117 | left join lw12_referrals on tickets.username = lw12_referrals.referred_by;
118 |
119 | -- Create meetups table
>>> 120 | create table
121 | public.meetups (
122 | id uuid not null default uuid_generate_v4(),
123 | created_at timestamp with time zone not null default now(),
124 | launch_week text not null references public.launch_weeks (id),Issue #261 - COST-COMPRESS-001 · 20240723155310_add_lw12_ticketing_schema.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20240723155310_add_lw12_ticketing_schema.sql |
| Location | line 120, col 1, exact |
| Message | Large text column without compression detected: create table public.meetups ( id uuid not null default uuid_generate_v4(), created_at timestamp with time zone not null default now(), launch_week text not null references public.launch_weeks (id), title text null, country text null, start_at timestamp with time zone null, link text null, display_info text |
116 | tickets
117 | left join lw12_referrals on tickets.username = lw12_referrals.referred_by;
118 |
119 | -- Create meetups table
>>> 120 | create table
121 | public.meetups (
122 | id uuid not null default uuid_generate_v4(),
123 | created_at timestamp with time zone not null default now(),
124 | launch_week text not null references public.launch_weeks (id),Issue #262 - COST-COMPRESS-001 · 20240911215059_troubleshooting_entries.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20240911215059_troubleshooting_entries.sql |
| Location | line 1, col 1, exact |
| Message | Large text column without compression detected: create table troubleshooting_entries ( id uuid primary key default gen_random_uuid(), title text not null, topics text[] not null, keywords text[], api jsonb, errors jsonb[], github_url text |
>>> 1 | create table troubleshooting_entries (
2 | id uuid primary key default gen_random_uuid(),
3 | title text not null,
4 | topics text[] not null,
5 | keywords text[],Issue #263 - QUAL-TEST-001 · 20240918220938_validation_history.sql
| Field | Value |
|---|---|
| Rule | QUAL-TEST-001 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | testing |
| File | 20240918220938_validation_history.sql |
| Location | line 1, col 1, exact |
| Message | Non-deterministic function 'NOW' detected - makes testing difficult |
>>> 1 | create table validation_history (
2 | id bigint generated always as identity primary key,
3 | tag text not null,
4 | created_at timestamp with time zone not null default now()
5 | );Issue #264 - COST-COMPRESS-001 · 20240918220938_validation_history.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20240918220938_validation_history.sql |
| Location | line 1, col 1, exact |
| Message | Large text column without compression detected: create table validation_history ( id bigint generated always as identity primary key, tag text |
>>> 1 | create table validation_history (
2 | id bigint generated always as identity primary key,
3 | tag text not null,
4 | created_at timestamp with time zone not null default now()
5 | );Issue #265 - QUAL-NAME-003 · 20241002215612_troubleshooting_validation.sql
| Field | Value |
|---|---|
| Rule | QUAL-NAME-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | naming |
| File | 20241002215612_troubleshooting_validation.sql |
| Location | line 7, col 1, exact |
| Message | Pattern matched: idx_troubleshooting_checksum |
3 |
4 | alter table troubleshooting_entries
5 | add column checksum text not null;
6 |
>>> 7 | create index idx_troubleshooting_checksum
8 | on troubleshooting_entries (checksum);
9 |
10 | create extension pg_jsonschema;
11 | Issue #266 - QUAL-NAME-002 · 20241002215612_troubleshooting_validation.sql
| Field | Value |
|---|---|
| Rule | QUAL-NAME-002 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | naming |
| File | 20241002215612_troubleshooting_validation.sql |
| Location | line 63, col 9, exact |
| Message | Ambiguous alias 'if' detected - use descriptive names (e.g., 'usr' instead of 'u') |
59 | }',
60 | instance := error
61 | ) then
62 | return false;
>>> 63 | end if;
64 | end loop;
65 |
66 | return true;
67 | end;Issue #267 - QUAL-DEAD-003 · 20250423133137_improve_vector_search.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250423133137_improve_vector_search.sql |
| Location | line 47, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 3 times in project. |
43 | concat('#', slug)
44 | end
45 | )
46 | end;
>>> 47 | $$;
48 |
49 | create or replace function search_content(
50 | embedding vector(1536),
51 | include_full_content boolean default false,Issue #268 - QUAL-DEAD-003 · 20250423133137_improve_vector_search.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250423133137_improve_vector_search.sql |
| Location | line 98, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 3 times in project. |
94 | from matched_section
95 | join public.page on matched_section.page_id = page.id
96 | group by page.id
97 | order by min(ranking);
>>> 98 | $$;Issue #269 - QUAL-DEAD-003 · 20250527221007_service_role_grants_error_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250527221007_service_role_grants_error_tables.sql |
| Location | line 3, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 3 times in project. |
1 | -- service_role needs access to content tables to run sync scripts
2 | grant usage on schema content to service_role;
>>> 3 | grant all on table content.service to service_role;
4 | grant all on table content.error to service_role;Issue #270 - QUAL-DEAD-003 · 20250527221007_service_role_grants_error_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250527221007_service_role_grants_error_tables.sql |
| Location | line 4, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 3 times in project. |
1 | -- service_role needs access to content tables to run sync scripts
2 | grant usage on schema content to service_role;
3 | grant all on table content.service to service_role;
>>> 4 | grant all on table content.error to service_role;Issue #271 - QUAL-DEAD-003 · 20250605201937_error_codes_table_ids.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250605201937_error_codes_table_ids.sql |
| Location | line 10, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 2 times in project. |
6 | grant select (id)
7 | on content.error
8 | to anon;
9 |
>>> 10 | grant select (id)
11 | on content.error
12 | to authenticated;Issue #272 - QUAL-TEST-003 · 20250714120000_hybrid_search.sql
| Field | Value |
|---|---|
| Rule | QUAL-TEST-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | testing |
| File | 20250714120000_hybrid_search.sql |
| Location | line 2, col 1, exact |
| Message | Pattern matched: ' as $$ with full_text as ( select id, row_number() over(order by greatest( least(10 * ts_rank(title_tokens, websearch_to_tsquery(query_text)), 1), ts_rank(fts_tokens, websearch_to_tsquery(query_text)) ) desc) as rank_ix from public.page where title_tokens @@ websearch_to_tsquery(query_text) or fts_tokens @@ websearch_to_tsquery(query_text) order by rank_ix limit least(max_result, 30) * 2 ), semantic as ( select page_id as id, row_numb |
1 | -- Hybrid search: combines FTS and vector search using reciprocal rank fusion (RRF)
>>> 2 | create or replace function search_content_hybrid(
3 | query_text text,
4 | query_embedding vector(1536),
5 | max_result int default 30,
6 | full_text_weight float default 1,Issue #273 - COST-COMPRESS-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 5, col 1, exact |
| Message | Large text column without compression detected: create table "public"."page_nimbus" ( id bigint primary key generated always as identity, path text not null unique, checksum text, meta jsonb, type text, source text, content text |
1 | -- Create nimbus tables for feature-flag-filtered search
2 | -- These tables mirror the structure of page and page_section but contain only content
3 | -- that should be visible when all feature flags are disabled
4 |
>>> 5 | create table "public"."page_nimbus" (
6 | id bigint primary key generated always as identity,
7 | path text not null unique,
8 | checksum text,
9 | meta jsonb,Issue #274 - COST-COMPRESS-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 34, col 1, exact |
| Message | Large text column without compression detected: create table "public"."page_section_nimbus" ( id bigint primary key generated always as identity, page_id bigint not null references public.page_nimbus (id) on delete cascade, content text, token_count int, embedding vector(1536), slug text, heading text |
30 | for select
31 | to authenticated
32 | using (true);
33 |
>>> 34 | create table "public"."page_section_nimbus" (
35 | id bigint primary key generated always as identity,
36 | page_id bigint not null references public.page_nimbus (id) on delete cascade,
37 | content text,
38 | token_count int,Issue #275 - QUAL-DEAD-003 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 123, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 6 times in project. |
119 | where (page_section_nimbus.embedding operator(public.<#>) embedding) <= -match_threshold
120 | order by page_section_nimbus.embedding operator(public.<#>) embedding
121 | limit max_results;
122 | end;
>>> 123 | $$;
124 |
125 | -- Create hybrid search function for nimbus tables
126 | create or replace function search_content_hybrid_nimbus(
127 | query_text text,Issue #276 - QUAL-TEST-003 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-TEST-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | testing |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 126, col 1, exact |
| Message | Pattern matched: ' as $$ with full_text as ( select id, row_number() over(order by greatest( least(10 * ts_rank(title_tokens, websearch_to_tsquery(query_text)), 1), ts_rank(fts_tokens, websearch_to_tsquery(query_text)) ) desc) as rank_ix from public.page_nimbus where title_tokens @@ websearch_to_tsquery(query_text) or fts_tokens @@ websearch_to_tsquery(query_text) order by rank_ix limit least(max_result, 30) * 2 ), semantic as ( select page_id as id, r |
122 | end;
123 | $$;
124 |
125 | -- Create hybrid search function for nimbus tables
>>> 126 | create or replace function search_content_hybrid_nimbus(
127 | query_text text,
128 | query_embedding vector(1536),
129 | max_result int default 30,
130 | full_text_weight float default 1,Issue #277 - QUAL-DEAD-003 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 193, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 6 times in project. |
189 | where rrf.rrf_score > 0
190 | group by page_nimbus.id
191 | order by max(rrf.rrf_score) desc
192 | limit max_result;
>>> 193 | $$;
194 |
195 | create or replace function match_page_sections_v2_nimbus(
196 | embedding vector(1536),
197 | match_threshold float,Issue #278 - QUAL-DEAD-003 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 223, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 6 times in project. |
219 | --
220 | -- For the different syntaxes, see https://github.com/pgvector/pgvector
221 | order by page_section_nimbus.embedding operator(public.<#>) embedding;
222 | end;
>>> 223 | $$;
224 |
225 | create or replace function docs_search_embeddings_nimbus(
226 | embedding vector(1536),
227 | match_threshold floatIssue #279 - QUAL-DEAD-003 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 271, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 6 times in project. |
267 | from public.page_nimbus
268 | join match on match.page_id = page_nimbus.id
269 | group by page_nimbus.id;
270 | end;
>>> 271 | $$;
272 |
273 | create or replace function search_content_nimbus(
274 | embedding vector(1536),
275 | include_full_content boolean default false,Issue #280 - QUAL-DEAD-003 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 324, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 6 times in project. |
320 | from matched_section
321 | join public.page_nimbus on matched_section.page_id = page_nimbus.id
322 | group by page_nimbus.id
323 | order by min(ranking);
>>> 324 | $$;
325 | Issue #281 - COST-COMPRESS-001 · 20260218202528_status_cache.sql
| Field | Value |
|---|---|
| Rule | COST-COMPRESS-001 |
| Severity | LOW |
| Dimension | cost |
| Subcategory | storage |
| File | 20260218202528_status_cache.sql |
| Location | line 1, col 1, exact |
| Message | Large text column without compression detected: create table if not exists public.incident_status_cache ( id bigint primary key generated always as identity, incident_id text unique not null, shortlink text unique not null, updated_at timestamptz not null default now(), affects_project_creation boolean not null default false, affected_regions text |
>>> 1 | create table if not exists public.incident_status_cache (
2 | id bigint primary key generated always as identity,
3 | incident_id text unique not null,
4 | shortlink text unique not null,
5 | updated_at timestamptz not null default now(),Issue #282 - QUAL-DEAD-003 · 20260218202528_status_cache.sql
| Field | Value |
|---|---|
| Rule | QUAL-DEAD-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | technical_debt |
| File | 20260218202528_status_cache.sql |
| Location | line 14, col 1, exact |
| Message | Duplicate query detected. Same normalized logic found 2 times in project. |
10 | alter table public.incident_status_cache
11 | enable row level security;
12 |
13 | revoke all on public.incident_status_cache from anon;
>>> 14 | revoke all on public.incident_status_cache from authenticated;
15 |
16 | create index if not exists idx_incident_status_cache_incident_id
17 | on public.incident_status_cache (incident_id);
18 | Issue #283 - QUAL-NAME-003 · 20260218202528_status_cache.sql
| Field | Value |
|---|---|
| Rule | QUAL-NAME-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | naming |
| File | 20260218202528_status_cache.sql |
| Location | line 16, col 1, exact |
| Message | Pattern matched: idx_incident_status_cache_incident_id |
12 |
13 | revoke all on public.incident_status_cache from anon;
14 | revoke all on public.incident_status_cache from authenticated;
15 |
>>> 16 | create index if not exists idx_incident_status_cache_incident_id
17 | on public.incident_status_cache (incident_id);
18 |
19 | create index if not exists idx_incident_status_cache_shortlink
20 | on public.incident_status_cache (shortlink);Issue #284 - QUAL-NAME-003 · 20260218202528_status_cache.sql
| Field | Value |
|---|---|
| Rule | QUAL-NAME-003 |
| Severity | LOW |
| Dimension | quality |
| Subcategory | naming |
| File | 20260218202528_status_cache.sql |
| Location | line 19, col 1, exact |
| Message | Pattern matched: idx_incident_status_cache_shortlink |
15 |
16 | create index if not exists idx_incident_status_cache_incident_id
17 | on public.incident_status_cache (incident_id);
18 |
>>> 19 | create index if not exists idx_incident_status_cache_shortlink
20 | on public.incident_status_cache (shortlink);
21 |
22 | create or replace function public.set_updated_at()
23 | returns triggerInfo - 33 issues
Issue #285 - REL-TXN-001 · 20230128004504_embedding_similarity_search.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20230128004504_embedding_similarity_search.sql |
| Location | line 1, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
>>> 1 | create or replace function match_page_sections(embedding vector(1536), match_threshold float, match_count int, min_content_length int)
2 | returns table (path text, content text, similarity float)
3 | language plpgsql
4 | as $$
5 | #variable_conflict use_variableIssue #286 - REL-TXN-001 · 20230217032716_page_hierarchy_function.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20230217032716_page_hierarchy_function.sql |
| Location | line 3, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
1 | drop function match_page_sections;
2 |
>>> 3 | create or replace function match_page_sections(embedding vector(1536), match_threshold float, match_count int, min_content_length int)
4 | returns table (id bigint, page_id bigint, slug text, heading text, content text, similarity float)
5 | language plpgsql
6 | as $$
7 | #variable_conflict use_variableIssue #287 - REL-TXN-001 · 20230403222943_reusable_match_function.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20230403222943_reusable_match_function.sql |
| Location | line 2, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
1 | -- Return a setof page_section so that we can use PostgREST resource embeddings (joins with other tables)
>>> 2 | create or replace function match_page_sections_v2(embedding vector(1536), match_threshold float, min_content_length int)
3 | returns setof page_section
4 | language plpgsql
5 | as $$
6 | #variable_conflict use_variableIssue #288 - REL-TXN-001 · 20231121164837_modify_search_functions.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20231121164837_modify_search_functions.sql |
| Location | line 6, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
2 | add column fts_tokens tsvector generated always as (to_tsvector('english', content)) stored;
3 |
4 | create index fts_search_index on page_section using gin(fts_tokens);
5 |
>>> 6 | create or replace function docs_search_fts(query text)
7 | returns table (
8 | id int8,
9 | path text,
10 | type text,Issue #289 - REL-TXN-001 · 20231121164837_modify_search_functions.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20231121164837_modify_search_functions.sql |
| Location | line 43, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
39 | group by page.id;
40 | end;
41 | $$;
42 |
>>> 43 | create or replace function docs_search_embeddings(
44 | embedding vector(1536),
45 | match_threshold float
46 | )
47 | returns table (Issue #290 - REL-TXN-001 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 37, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
33 | -- due to underlying ts_rank algorithm
34 |
35 | drop function docs_search_fts;
36 |
>>> 37 | create or replace function docs_search_fts(query text)
38 | returns table (
39 | id int8,
40 | path text,
41 | type text,Issue #291 - PERF-IDX-004 · 20231127222412_search_full_text_for_fts.sql
| Field | Value |
|---|---|
| Rule | PERF-IDX-004 |
| Severity | INFO |
| Dimension | performance |
| Subcategory | index |
| File | 20231127222412_search_full_text_for_fts.sql |
| Location | line 37, col 1, exact |
| Message | OR condition in WHERE clause detected: where title_tokens @@ websearch_to_tsquery(query) or |
33 | -- due to underlying ts_rank algorithm
34 |
35 | drop function docs_search_fts;
36 |
>>> 37 | create or replace function docs_search_fts(query text)
38 | returns table (
39 | id int8,
40 | path text,
41 | type text,Issue #292 - REL-TXN-001 · 20240129101115_add_ipv6_active_status_rpc.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20240129101115_add_ipv6_active_status_rpc.sql |
| Location | line 6, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
2 | or replace function ipv6_active_status (project_ref text) returns table (pgbouncer_active boolean, vercel_active boolean) as $$
3 | declare
4 | pgbouncer_active boolean;
5 | vercel_active boolean;
>>> 6 | begin
7 | select exists (
8 | select 1
9 | from active_pgbouncer_projects ap
10 | where ap.project_ref = $1Issue #293 - REL-TXN-001 · 20240605171314_last_changed_update.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20240605171314_last_changed_update.sql |
| Location | line 15, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
11 | declare
12 | existing_id bigint;
13 | previous_checksum text;
14 | updated_check_time timestamp with time zone;
>>> 15 | begin
16 | select id, checksum into existing_id, previous_checksum
17 | from public.last_changed
18 | where
19 | parent_page = new_parent_pageIssue #294 - REL-TXN-001 · 20240605171314_last_changed_update.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20240605171314_last_changed_update.sql |
| Location | line 79, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
75 | as $$
76 | declare
77 | newest_check_time timestamp with time zone;
78 | number_deleted integer;
>>> 79 | begin
80 | select last_checked into newest_check_time
81 | from public.last_changed
82 | order by last_checked desc
83 | limit 1Issue #295 - REL-TXN-001 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 8, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
4 | alter function public.cleanup_last_changed_pages
5 | set search_path = '';
6 |
7 | -- Return a setof page_section so that we can use PostgREST resource embeddings (joins with other tables)
>>> 8 | create or replace function match_page_sections_v2(
9 | embedding vector(1536),
10 | match_threshold float,
11 | min_content_length int
12 | )Issue #296 - REL-TXN-001 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 50, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
46 | as $$
47 | declare
48 | pgbouncer_active boolean;
49 | vercel_active boolean;
>>> 50 | begin
51 | select exists (
52 | select 1
53 | from public.active_pgbouncer_projects ap
54 | where ap.project_ref = $1Issue #297 - REL-TXN-001 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 67, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
63 | return query select pgbouncer_active, vercel_active;
64 | end;
65 | $$ language plpgsql security definer;
66 |
>>> 67 | create or replace function docs_search_embeddings(
68 | embedding vector(1536),
69 | match_threshold float
70 | )
71 | returns table (Issue #298 - REL-TXN-001 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 115, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
111 | group by page.id;
112 | end;
113 | $$;
114 |
>>> 115 | create or replace function docs_search_fts(query text)
116 | returns table (
117 | id int8,
118 | path text,
119 | type text,Issue #299 - PERF-IDX-004 · 20240626184716_misc_database_fixes.sql
| Field | Value |
|---|---|
| Rule | PERF-IDX-004 |
| Severity | INFO |
| Dimension | performance |
| Subcategory | index |
| File | 20240626184716_misc_database_fixes.sql |
| Location | line 115, col 1, exact |
| Message | OR condition in WHERE clause detected: where title_tokens @@ websearch_to_tsquery(query) or |
111 | group by page.id;
112 | end;
113 | $$;
114 |
>>> 115 | create or replace function docs_search_fts(query text)
116 | returns table (
117 | id int8,
118 | path text,
119 | type text,Issue #300 - REL-TXN-001 · 20240911215059_troubleshooting_entries.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20240911215059_troubleshooting_entries.sql |
| Location | line 15, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
11 | );
12 |
13 | alter table troubleshooting_entries enable row level security;
14 |
>>> 15 | create or replace function update_troubleshooting_entry_date_updated() returns trigger as $$
16 | begin
17 | new.date_updated = now();
18 | return new;
19 | end;Issue #301 - COST-IDX-004 · 20240918220938_validation_history.sql
| Field | Value |
|---|---|
| Rule | COST-IDX-004 |
| Severity | INFO |
| Dimension | cost |
| Subcategory | index_optimization |
| File | 20240918220938_validation_history.sql |
| Location | line 7, col 1, exact |
| Message | Composite index column order signal: check if order matches query patterns: create index validation_history_tag_created_at_idx on validation_history (tag, created_at |
3 | tag text not null,
4 | created_at timestamp with time zone not null default now()
5 | );
6 |
>>> 7 | create index validation_history_tag_created_at_idx on validation_history (tag, created_at desc);
8 |
9 | alter table validation_history enable row level security;
10 |
11 | create or replace function get_last_revalidation_for_tags(tags text[])Issue #302 - REL-TXN-001 · 20241002215612_troubleshooting_validation.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20241002215612_troubleshooting_validation.sql |
| Location | line 43, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
39 | create or replace function validate_troubleshooting_errors(errors jsonb[])
40 | returns boolean as $$
41 | declare
42 | error jsonb;
>>> 43 | begin
44 | if errors is null then
45 | return true;
46 | end if;
47 | Issue #303 - REL-TXN-001 · 20250423133137_improve_vector_search.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20250423133137_improve_vector_search.sql |
| Location | line 1, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
>>> 1 | create or replace function match_embedding(
2 | embedding vector(1536),
3 | match_threshold float default 0.78,
4 | max_results int default 30
5 | )Issue #304 - QUAL-COMPLEX-005 · 20250430202653_return_meta_vector_search.sql
| Field | Value |
|---|---|
| Rule | QUAL-COMPLEX-005 |
| Severity | INFO |
| Dimension | quality |
| Subcategory | complexity |
| File | 20250430202653_return_meta_vector_search.sql |
| Location | line 5, col 1, exact |
| Message | Query is 51 lines long - consider breaking into smaller queries or using CTEs |
1 | -- Alter the search_content function to also return the page metadata
2 |
3 | drop function search_content;
4 |
>>> 5 | create or replace function search_content(
6 | embedding vector(1536),
7 | include_full_content boolean default false,
8 | match_threshold float default 0.78,
9 | max_result int default 30Issue #305 - REL-TXN-001 · 20250521194255_error_code_update_functions.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20250521194255_error_code_update_functions.sql |
| Location | line 21, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
17 | #variable_conflict use_variable
18 | declare
19 | service_id uuid;
20 | result boolean;
>>> 21 | begin
22 | insert into content.service (name)
23 | values (service)
24 | on conflict (name) do nothing;
25 | Issue #306 - REL-TXN-001 · 20250529214621_store_error_metadata.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20250529214621_store_error_metadata.sql |
| Location | line 51, col 1, exact |
| Message | Transaction opened — verify ROLLBACK handler exists: begin |
47 | #variable_conflict use_variable
48 | declare
49 | service_id uuid;
50 | result boolean;
>>> 51 | begin
52 | insert into content.service (name)
53 | values (service)
54 | on conflict (name) do nothing;
55 | Issue #307 - PERF-IDX-004 · 20250714120000_hybrid_search.sql
| Field | Value |
|---|---|
| Rule | PERF-IDX-004 |
| Severity | INFO |
| Dimension | performance |
| Subcategory | index |
| File | 20250714120000_hybrid_search.sql |
| Location | line 2, col 1, exact |
| Message | OR condition in WHERE clause detected: where title_tokens @@ websearch_to_tsquery(query_text) or |
1 | -- Hybrid search: combines FTS and vector search using reciprocal rank fusion (RRF)
>>> 2 | create or replace function search_content_hybrid(
3 | query_text text,
4 | query_embedding vector(1536),
5 | max_result int default 30,
6 | full_text_weight float default 1,Issue #308 - QUAL-COMPLEX-005 · 20250714120000_hybrid_search.sql
| Field | Value |
|---|---|
| Rule | QUAL-COMPLEX-005 |
| Severity | INFO |
| Dimension | quality |
| Subcategory | complexity |
| File | 20250714120000_hybrid_search.sql |
| Location | line 2, col 1, exact |
| Message | Query is 67 lines long - consider breaking into smaller queries or using CTEs |
1 | -- Hybrid search: combines FTS and vector search using reciprocal rank fusion (RRF)
>>> 2 | create or replace function search_content_hybrid(
3 | query_text text,
4 | query_embedding vector(1536),
5 | max_result int default 30,
6 | full_text_weight float default 1,Issue #309 - REL-TXN-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 70, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
66 | on page_nimbus
67 | using gin(title_tokens);
68 |
69 | -- Create search function for nimbus tables (FTS search)
>>> 70 | create or replace function docs_search_fts_nimbus(query text)
71 | returns table (
72 | id bigint,
73 | path text,
74 | type text,Issue #310 - PERF-IDX-004 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | PERF-IDX-004 |
| Severity | INFO |
| Dimension | performance |
| Subcategory | index |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 70, col 1, exact |
| Message | OR condition in WHERE clause detected: where title_tokens @@ websearch_to_tsquery(query) or |
66 | on page_nimbus
67 | using gin(title_tokens);
68 |
69 | -- Create search function for nimbus tables (FTS search)
>>> 70 | create or replace function docs_search_fts_nimbus(query text)
71 | returns table (
72 | id bigint,
73 | path text,
74 | type text,Issue #311 - REL-TXN-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 105, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
101 | end;
102 | $$;
103 |
104 | -- Create embedding matching function for nimbus tables
>>> 105 | create or replace function match_embedding_nimbus(
106 | embedding vector(1536),
107 | match_threshold float default 0.78,
108 | max_results int default 30
109 | )Issue #312 - PERF-IDX-004 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | PERF-IDX-004 |
| Severity | INFO |
| Dimension | performance |
| Subcategory | index |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 126, col 1, exact |
| Message | OR condition in WHERE clause detected: where title_tokens @@ websearch_to_tsquery(query_text) or |
122 | end;
123 | $$;
124 |
125 | -- Create hybrid search function for nimbus tables
>>> 126 | create or replace function search_content_hybrid_nimbus(
127 | query_text text,
128 | query_embedding vector(1536),
129 | max_result int default 30,
130 | full_text_weight float default 1,Issue #313 - QUAL-COMPLEX-005 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-COMPLEX-005 |
| Severity | INFO |
| Dimension | quality |
| Subcategory | complexity |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 126, col 1, exact |
| Message | Query is 67 lines long - consider breaking into smaller queries or using CTEs |
122 | end;
123 | $$;
124 |
125 | -- Create hybrid search function for nimbus tables
>>> 126 | create or replace function search_content_hybrid_nimbus(
127 | query_text text,
128 | query_embedding vector(1536),
129 | max_result int default 30,
130 | full_text_weight float default 1,Issue #314 - REL-TXN-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 195, col 1, exact |
| Message | Transaction opened — verify ROLLBACK handler exists: begin |
191 | order by max(rrf.rrf_score) desc
192 | limit max_result;
193 | $$;
194 |
>>> 195 | create or replace function match_page_sections_v2_nimbus(
196 | embedding vector(1536),
197 | match_threshold float,
198 | min_content_length int
199 | )Issue #315 - REL-TXN-001 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 225, col 1, exact |
| Message | Transaction opened — verify ROLLBACK handler exists: begin |
221 | order by page_section_nimbus.embedding operator(public.<#>) embedding;
222 | end;
223 | $$;
224 |
>>> 225 | create or replace function docs_search_embeddings_nimbus(
226 | embedding vector(1536),
227 | match_threshold float
228 | )
229 | returns table (Issue #316 - QUAL-COMPLEX-005 · 20250910155912_create_nimbus_search_tables.sql
| Field | Value |
|---|---|
| Rule | QUAL-COMPLEX-005 |
| Severity | INFO |
| Dimension | quality |
| Subcategory | complexity |
| File | 20250910155912_create_nimbus_search_tables.sql |
| Location | line 273, col 1, exact |
| Message | Query is 51 lines long - consider breaking into smaller queries or using CTEs |
269 | group by page_nimbus.id;
270 | end;
271 | $$;
272 |
>>> 273 | create or replace function search_content_nimbus(
274 | embedding vector(1536),
275 | include_full_content boolean default false,
276 | match_threshold float default 0.78,
277 | max_result int default 30Issue #317 - REL-TXN-001 · 20260218202528_status_cache.sql
| Field | Value |
|---|---|
| Rule | REL-TXN-001 |
| Severity | INFO |
| Dimension | reliability |
| Subcategory | transaction |
| File | 20260218202528_status_cache.sql |
| Location | line 22, col 1, exact |
| Message | Transaction opened - verify ROLLBACK handler exists: begin |
18 |
19 | create index if not exists idx_incident_status_cache_shortlink
20 | on public.incident_status_cache (shortlink);
21 |
>>> 22 | create or replace function public.set_updated_at()
23 | returns trigger
24 | language plpgsql
25 | as $$
26 | beginReport generated by SlowQL - SQL migration analysis engine.
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Supabase team,
I hope you're doing well.
I ran a static analysis of all your migration scripts (
supabase/migrations/*.sql) using SlowQL an offline SQL analyzer I maintain with 282 rules covering security, reliability, quality, performance, cost, and compliance.This is not a list of bugs or a criticism of your code. These are insights and observations. Many of the patterns flagged are likely intentional given Supabase’s architecture, RLS requirements, migration strategies, and specific workflows. I’ve tried to surface things that might be worth reviewing or could be improved in the long term, but context is everything.
Summary of the analysis:
The most common category is Quality (226 issues), followed by Reliability (53). There are also 31 critical + high severity findings that might deserve a closer look.
I’ve prepared a full detailed report (grouped by file, with exact line numbers, rule explanations, SQL snippets, and severity) which you can view in the comment below.
I’m happy to:
Would love to hear your thoughts - even if it’s just “this is useful” or “this doesn’t apply because of X”. No pressure at all.
Thanks for building such an amazing open-source platform. Looking forward to any feedback you might have.
Best regards,
Mehdi Makroumi
SlowQL maintainer
Beta Was this translation helpful? Give feedback.
All reactions