caelum0x d7bbaf483b fix: resend without an account, working --create-project preview, idempotent re-runs, closing CTA line
- resend no longer demands --to or a Scribase token (it only exports JSON)
- --create-project read --region from argv[0] when the flag was absent
- --create-project --kind preview now creates an empty schema_only env; a
  snapshot failed with source_environment_missing on a new project
- clerk --dry-run created users; neon --dry-run wrote into the real
  supabase/migrations folder
- a second neon run re-added the schema step; identical steps are reused and
  pg_dump version banners are stripped so identical dumps stay identical
- <source> --help, --version, clear errors for a missing pg_dump, a reused
  deleted environment name and a missing token (with the signup link)
- output ends with one plain line pointing at scribase.com/migrate
- README: quickstart that works today (npx from Rithub, not the unpublished
  npm name), real output sample, verified/not-verified split; add LICENSE

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-17 20:10:39 +03:00

2.5 KiB

v0.1.1 re-verification (2026-11-17)

Source: throwaway Postgres 16.16 (initdb in /tmp), seeded with test-fixtures/seed-source.sql. Destination: a real Scribase preview environment, ereboslab/scribase-migrate-wave8c/try1, created by the tool itself and deleted afterwards.

$ scribase-migrate neon --to ereboslab/scribase-migrate-wave8c/try1 --create-project --kind preview \
    --source-url postgres://postgres@127.0.0.1:55439/src --migrate-auth-users \
    --verify-row-counts public.profiles --verify-row-counts public.notes --out run1.json
  exporting auth.users rows
  auth.users: 2 rows, applied=true
  dumping public schema
  public schema: 0 lint findings, applied=true
  dumping public data
  public data: applied=true

35 seconds wall clock including project and environment creation. Row counts: public.profiles 2/2, public.notes 3/3, both match: true.

Second identical run: no new migration files, applied=false for all three steps, counts still match. After changing one source password hash and running a third time: exactly one new import_auth_users step, applied; POST /auth/v1/token?grant_type=password on the destination then returned 200 with an access token for the new password and 400 Invalid login credentials for a wrong one.

--dry-run against ereboslab/scribase-migrate-verify-internal/production returned a 3-step plan with 0 lint findings and left supabase/migrations/ untouched.

Bugs found by running it the way the README said, all fixed in 0.1.1:

  • resend demanded --to and a Scribase token although it only exports a JSON file.
  • --create-project without --region read the region from the first argument on the command line (it sent --to or the source name as the region).
  • --create-project --kind preview failed on a new project with source_environment_missing (it asked for a production snapshot that does not exist yet).
  • clerk --dry-run ignored the flag and created users.
  • neon --dry-run wrote planned steps into the real supabase/migrations/ folder.
  • A second neon run wrote the schema step again under a new version, so the destination was asked to create every table twice. pg_dump version banners also made identical dumps differ.
  • <source> --help and --version answered "--to is required".
  • A missing pg_dump surfaced as spawn pg_dump ENOENT.
  • With no token, nothing told a new user where to get an account.
  • The README told people to run npx scribase-migrate, which is not on npm.