Remix.run Logo
Show HN: Aim – AI-assisted verifiable SQL migration generator(github.com)
2 points by alecthomas 6 hours ago | 2 comments

This is pretty fresh and definitely not battle tested, but seems to work pretty well in my local testing. Do NOT just blindly apply the output of this to a production database :)

From the README:

AIM creates two ephemeral databases: one by loading schema.sql (the desired state), and one by replaying all existing migrations (the current state). It dumps a stable, normalized DDL representation from each.

An LLM reads both schemas and produces UP and DOWN SQL migration statements.

AIM applies the generated UP migration to a fresh ephemeral database and checks that the result exactly matches schema.sql. It then applies DOWN and checks that the original state is restored. If either check fails, AIM feeds the diff back to the LLM and retries.

6 hours ago | parent | next [-]
[deleted]
6 hours ago | parent | prev [-]
[deleted]