Cli: Migrations with sql raw scripts

Created on 4 Sep 2019  路  5Comments  路  Source: sequelize/cli

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:

Captura de Tela 2019-09-04 脿s 16 04 50

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.
feature

All 5 comments

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?

image

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?

image

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

przbadu picture przbadu  路  3Comments

arndeash picture arndeash  路  3Comments

papb picture papb  路  3Comments

gotrevor picture gotrevor  路  5Comments

f1nnix picture f1nnix  路  4Comments