Skip to content

Commit 7ef49ab

Browse files
committed
perf(cli): skip RDS/self-managed steps in Supabase mode
Supabase is neither RDS nor self-managed, so skip these steps entirely rather than attempting and failing: - 03.optional_rds (rds_tools extension, etc.) - 04.optional_self_managed (pg_stat_file, pg_ls_dir, etc.) This reduces unnecessary API calls and speeds up the command.
1 parent 7885ba5 commit 7ef49ab

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cli/bin/postgres-ai.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -854,9 +854,14 @@ program
854854
includeOptionalPermissions,
855855
});
856856

857+
// For Supabase mode, skip RDS and self-managed steps (they don't apply)
858+
const supabaseApplicableSteps = plan.steps.filter(
859+
(s) => s.name !== "03.optional_rds" && s.name !== "04.optional_self_managed"
860+
);
861+
857862
const effectivePlan = opts.resetPassword
858-
? { ...plan, steps: plan.steps.filter((s) => s.name === "01.role") }
859-
: plan;
863+
? { ...plan, steps: supabaseApplicableSteps.filter((s) => s.name === "01.role") }
864+
: { ...plan, steps: supabaseApplicableSteps };
860865

861866
if (shouldPrintSql) {
862867
console.log("\n--- SQL plan ---");

0 commit comments

Comments
 (0)