Electron100 / butane

An ORM for Rust with a focus on simplicity and on writing Rust, not SQL
Apache License 2.0
94 stars 13 forks source link

Migrations directory contains lots of duplicate .table files #121

Closed jayvdb closed 6 months ago

jayvdb commented 1 year ago

Each migration directory contains .table files for every model. I suspect it only needs to contain .table files for models that were modified in that migration. The current migration has the current complete set, and a complete set could also be obtained by stepping through the previous migrations back to the initial migration.

Electron100 commented 1 year ago

That's true, although there's a reasonable bit of refactoring in the migrations logic that would be necessary to do that space optimization. Are you observing a particular problem from the duplicate files, or just observing it as an area for general cleanliness improvement?

jayvdb commented 1 year ago

It is just an observation, and not important. Similar to https://github.com/Electron100/butane/issues/62 , when these files are being committed and reviewed, if there is lots of unnecessary .table files in a PR it is harder to carefully review the .table files which are modified.