cli
cli copied to clipboard
Migrations with sql raw scripts
We want to build migrations with raw sql
Migrations with anything more then sql files.
We want to use the migration interface of sequelize to run raw sql migrations. So everyone speak the same language across the company. DBAs, QAs, DEV in others stacks then js.
Everyone today already speak SQL.
Solution
A new subset of intelligence on sequelize for understanding sql files in migrations and seeds folders, like image bellow:

Why should this be in Sequelize
Because its a great tool not just for running the applications but also for maintenance and cross development.
Issue Template Checklist
Is this issue dialect-specific?
- [x] No. This issue is relevant to Sequelize as a whole.
- [ ] Yes. This issue only applies to the following dialect(s): XXX, YYY, ZZZ
Would you be willing to resolve this issue by submitting a Pull Request?
- [x] Yes, I have the time and I know how to start.
- [ ] Yes, I have the time but I don't know how to start, I would need guidance.
- [ ] No, I don't have the time, although I believe I could do it if I had the time...
- [ ] No, I don't have the time and I wouldn't even know how to start.
This totally makes sense.
[x] Yes, I have the time and I know how to start.
Nice!! Did you know that the migration library behind sequelize-cli (umzug) already supports this?
So it is probably easy to implement your request by simply making sequelize-cli allow passing a custom object to the underlying umzug object...
I will migrate this issue to the sequelize-cli repository though
This totally makes sense.
[x] Yes, I have the time and I know how to start.
Nice!! Did you know that the migration library behind sequelize-cli (umzug) already supports this?
So it is probably easy to implement your request by simply making sequelize-cli allow passing a custom object to the underlying umzug object...
Yes, I already using this feature. I have almost everthing here, the sql reader, the migration runner and the migration creator. I just have to integrate this with the migration runner of cli and the regex
Awesome!! Please create the PR when you can! Thank you very much!
Forked and branch starting. Maybe I will need some design opnion from you @papb.