chore(comments): re-point dangling supabase/migrations breadcrumbs

The Supabase purge deleted the archived supabase/migrations/.archived/
directory, but 12 src/ files still referenced its files by path in
JSDoc / TODO comments. The references were misleading (pointing to
deleted files), so re-point them at the canonical location of those
RPCs in db/migrations/0001_init.sql. No code or behavior changes.

Also fixed a stray 'supabase shim returns empty results' comment in
src/app/admin/page.tsx (the shim was already removed in Step 3 of
the refactor).
This commit is contained in:
Nora
2026-06-25 17:52:54 -06:00
parent 49b8e27219
commit b018f2be5b
13 changed files with 55 additions and 48 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ export default async function AdminPage() {
// so a transient DB/network failure can't crash the whole admin page.
let dashboardBrandId: string | null = adminUser ? await getActiveBrandId(adminUser) : null;
if (!dashboardBrandId && adminUser?.role === "platform_admin") {
// Direct pg query (the supabase shim returns empty results).
// Direct pg query (the legacy query-builder shim returned empty results).
// This ensures a platform_admin sees real dashboard stats even on first login
// before they have chosen an active brand.
try {
+2 -1
View File
@@ -4,7 +4,8 @@
* TODO(migration): wholesale_orders is part of the legacy schema and
* is read/written via raw `pool.query` SQL. The `get_wholesale_settings`
* and `get_payment_settings` SECURITY DEFINER RPCs still live in the
* database (see supabase/migrations/046 and 045) and are also called
* database (originally from the now-archived supabase migrations;
* consolidated into `db/migrations/0001_init.sql`) and are also called
* via `pool.query`. When wholesale is reactivated, declare the tables
* in `db/schema/wholesale.ts` and switch the reads to typed Drizzle.
*/
+4 -4
View File
@@ -5,10 +5,10 @@
* `enqueue_wholesale_notification` SECURITY DEFINER RPC live in the
* legacy schema. Reads are converted to `pool.query`; the
* `enqueue_wholesale_notification` RPC is still in the database
* (supabase/migrations/054) and is called via `pool.query` rather
* than the Supabase REST gateway. When wholesale is reactivated,
* move the tables into `db/schema/wholesale.ts` and switch reads to
* typed Drizzle.
* (originally from the now-archived supabase migrations; consolidated
* into `db/migrations/0001_init.sql`) and is called via `pool.query`.
* When wholesale is reactivated, move the tables into
* `db/schema/wholesale.ts` and switch reads to typed Drizzle.
*/
import { NextRequest, NextResponse } from "next/server";