tortoise / aerich

A database migrations tool for TortoiseORM, ready to production.
https://github.com/tortoise/aerich
Apache License 2.0
808 stars 91 forks source link

Per-database type folders in the migrations folder #214

Open pmdevita opened 2 years ago

pmdevita commented 2 years ago

I'm working on an application where I'm using SQLite in local testing and deploying to a server using MySQL. However, even though different migrations files are created for different database types, it stores them all in the same place under migrations/ and I currently have to manually copy the folder around to make sure I don't overwrite one type of migration with another.

Django doesn't have this issue because it abstracts it's migrations into Python scripts but since we are writing SQL query files here, I think it would be best to separate into per-database type folders like

migrations/
  sqlite/
  mysql/
  postgresql/