lukeed / ley

(WIP) Driver-agnostic database migrations
MIT License
259 stars 14 forks source link

Question: exits grabs all migrations #29

Closed lukasa1993 closed 1 year ago

lukasa1993 commented 1 year ago

any way it can grab only last one ? or is there any need to grab all of them ?

i see it does diff but since its forward only wouldn't it be same to just continue from last one?

lukeed commented 1 year ago

Not sure what you’re asking. Migrations are alphasorted and it continues from the last-applied migration. This way if you have run 01, 02, and 04 you wouldn’t be able to add 03 later and expect it to run

lukasa1993 commented 1 year ago

from text.js exist query i am under impression it grabs whole table not last one and it diffs it agains whole folder. so wonder if it can grab last one from exists query instead

lukeed commented 1 year ago

It doesn’t matter. 5k migration names coming from the table is going to be done in 1ms or less across all DB engines