drizzle-team / drizzle-kit-mirror

Docs and issues repository for drizzle-kit
289 stars 17 forks source link

Deterministic `introspect` schema output #259

Open clovis1122 opened 11 months ago

clovis1122 commented 11 months ago

Hello!

It would be nice if the introspected output was deterministic. One way to do this is to sort the tables, columns, and other data before creating the final schema file.

I've made a quick fix for my use case, but I'm happy to push a fix if I'm pointed at the source code.

Thanks.

alanhamlett commented 11 months ago

Also, IMO the snapshot shouldn't be saved for each migration but only used as input to creating the schema diff. It's redundant to keep a full snapshot of the schema for each version.