Comment

Comment by tudorg

Yes, but we're working on a converter from DDL sql to pgroll json.

The reason for JSON is because the pgroll migrations are "higher level". For example, let's say that you are adding a new unique column that should infer its data from an existing column (e.g. split `name` into `first_name` and `last_name`). The pgroll migration contains not only the info that new columns are added, but also about how to backfill the data.

The sql2pgroll converter is creating the higher level migration files, but leaves placeholder for the "up" / "down" data migrations.

The issue where sql2pgroll is tracked is this one: https://github.com/xataio/pgroll/issues/504

parent tudorg 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton