allow importing/specifying migrations instead of pointing to directory
moodysalem opened this issue ยท 3 comments
this would make it easier for me to use the tool because i run migrations programmatically before my application starts, and i want the transpilation/build process to apply to migration files
Could you explain a bit more?
How is your file-structure?
How do you call node-pg-migrate
?
How do you want to call it instead?
Do you have an example Open Source repo you could link to show how it should be improved?
Could you explain a bit more?
How is your file-structure? How do you call
node-pg-migrate
? How do you want to call it instead? Do you have an example Open Source repo you could link to show how it should be improved?
This is how I currently do schema https://github.com/EkuboProtocol/indexer/blob/84392cc4809fa02dc54a4c16c1333f26f583e03c/src/dao.ts#L101
I just want something that lets me organize this into a list of changesets and creates/manages a DB table for tracking migration state. I still want to use all typescript everywhere
Ok, yeah, that is a lot ๐ค
node-pg-migrate could only handle the createSchema
stuff, but you have far more other stuff also below as well.
Did you considered trying out knex?
Either way, node-pg-migrate
can use .ts
migration files, but these would fully be moved to a separate migration folder. I would need to check myself how to execute these migrations then programmatically from inside a project startup.
I think I will come back to this issue later, and currently focus priority to some other more minor stuff. I hope that's ok. ๐