Skip to content

Commit a956b50

Browse files
committed
feat: add deno script for running pg-delta
1 parent f1c3b1c commit a956b50

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

internal/db/diff/delta/deno.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"nodeModulesDir": "auto",
3+
"imports": {
4+
"npm:@supabase/pg-delta": "../../../../../pg-delta/src/core/main.ts",
5+
"npm:@supabase/integrations": "../../../../../pg-delta/src/core/integrations/integrations/supabase.ts",
6+
"postgres": "npm:postgres@^3.4.7",
7+
"debug": "npm:debug@^4.3.7",
8+
"zod": "npm:zod@^4.1.13"
9+
}
10+
}

internal/db/diff/delta/deno.lock

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/db/diff/delta/main.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { main } from "npm:@supabase/pg-delta";
2+
import { supabase } from "npm:@supabase/integrations";
3+
4+
const source = Deno.env.get("SOURCE");
5+
const target = Deno.env.get("TARGET");
6+
7+
const { migrationScript } = await main(source, target, supabase)
8+
console.log(migrationScript)

0 commit comments

Comments
 (0)