How can we help you today? How can we help you today?

Separate Scripts for each object in deployment scripts

Is it possible to generate separate scripts for each object for deployment, as the generate script creates one large script with all the changes in one file.

DenisJCilliers
0

Comments

4 comments

  • Peter_Laws
    Hi DenisJCilliers,

    After a fashion yes. If instead of deploying to a db, you deploy to a scripts folder, multiple scripts will be generated, one for each db object.

    For more details, please see here.
    Peter_Laws
    0
  • DenisJCilliers
    There is one flaw with this approach in that it would deploy the full database and not the difference between databases.  I was looking to create the deployment script that is generated from one database to another as separate scripts.
    DenisJCilliers
    0
  • Peter_Laws
    Ah excuse me, I took your message to mean you wanted to capture the objects not deploy them.
    Natively no but it is possible to iterate through, there's a sample pipeline that demonstrates this available here https://github.com/red-gate/Flyway-Sample-Pipelines/blob/main/CLI-autocapture-autoscript/automated-capture-migration-per-object.ps1
    Peter_Laws
    0
  • DenisJCilliers
    Nice Script
    That is a very interesting script, and a clever way to create migrations, I might just look at doing the same thing just with the deployment scripts.

    --i-agree-to-the-eula 
    I understand that the marketing guys have an issue with the eula, but they really need to chill and not ask us to keep putting --i-agree-to-the-eula  in very command line.  ;), Take it as stated that if we are using the product we agree to the terms - as this is 5x in one short script
    DenisJCilliers
    0

Add comment

Please sign in to leave a comment.