diff --git a/internal/db/diff/delta/deno.json b/internal/db/diff/delta/deno.json new file mode 100644 index 000000000..e18686ebb --- /dev/null +++ b/internal/db/diff/delta/deno.json @@ -0,0 +1,10 @@ +{ + "nodeModulesDir": "auto", + "imports": { + "npm:@supabase/pg-delta": "../../../../../pg-delta/src/core/main.ts", + "npm:@supabase/integrations": "../../../../../pg-delta/src/core/integrations/integrations/supabase.ts", + "postgres": "npm:postgres@^3.4.7", + "debug": "npm:debug@^4.3.7", + "zod": "npm:zod@^4.1.13" + } +} diff --git a/internal/db/diff/delta/deno.lock b/internal/db/diff/delta/deno.lock new file mode 100644 index 000000000..4aec53bde --- /dev/null +++ b/internal/db/diff/delta/deno.lock @@ -0,0 +1,32 @@ +{ + "version": "5", + "specifiers": { + "npm:debug@^4.3.7": "4.4.3", + "npm:postgres@^3.4.7": "3.4.7", + "npm:zod@^4.1.13": "4.1.13" + }, + "npm": { + "debug@4.4.3": { + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dependencies": [ + "ms" + ] + }, + "ms@2.1.3": { + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "postgres@3.4.7": { + "integrity": "sha512-Jtc2612XINuBjIl/QTWsV5UvE8UHuNblcO3vVADSrKsrc6RqGX6lOW1cEo3CM2v0XG4Nat8nI+YM7/f26VxXLw==" + }, + "zod@4.1.13": { + "integrity": "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==" + } + }, + "workspace": { + "dependencies": [ + "npm:debug@^4.3.7", + "npm:postgres@^3.4.7", + "npm:zod@^4.1.13" + ] + } +} diff --git a/internal/db/diff/delta/main.ts b/internal/db/diff/delta/main.ts new file mode 100644 index 000000000..f9db2a7a3 --- /dev/null +++ b/internal/db/diff/delta/main.ts @@ -0,0 +1,8 @@ +import { main } from "npm:@supabase/pg-delta"; +import { supabase } from "npm:@supabase/integrations"; + +const source = Deno.env.get("SOURCE"); +const target = Deno.env.get("TARGET"); + +const { migrationScript } = await main(source, target, supabase) +console.log(migrationScript)