Dependencies between projects

I'm trying to switch our database deployments to use ReadyRoll rather than our own customized tool.

We have several products and they each have their own database where they store their data. We We also have an architecture/framework that all of our products are built on top of that provides a lot of base functionality (batch processing, metadata driven screen customization, etc) this architecture has its own database which holds configuration metadata.

The products interact with this architecture database via API that are exposed through dlls that they consume via nuget. Each of the products has a copy of this architecture database. So in short the DDL of the database is controlled by the architecture "product" along with some core set of data while each product consumes this database and stores their own set of data.

I've created a ReadyRoll project for the architecture database that generates the database and populates it with the core set of data. This is working great and I have no issues with it.

I want the products to able to maintain scripts that define their metadata that is stored in the architecture database but I don't want them managing the DDL so I tried creating a separate ReadyRoll roject called <Product>.Database.Metadata with the goal of only including static data scripts which would be deployed to their copy of the architecture database (created by deploying the ReadyRoll project for the architecure database mentioned before).

I'm having issues with this approach because the <Product>.Database.Metadata fails when verifying the scripts because the project itself doesn't contain the scripts to create the DB.

Is there a way that I can have a project B that depends on a project A (these projects are on separate solutions) such that one project A dependency will create the database itself and populate it with a core set of data and the project B will just execute static data scripts to populate the database with more data.

Any help with this would be greatly appreciated!
Tagged:

Comments

  • Thanks for your question and for the detail you put into setting the context to the problem.

    It sounds like what you're after is partial projects; unfortunately ReadyRoll does not have this capability at the moment. However something along those lines might be possible if you were to use the output artifacts of ProjectA, for example the SQLCMD package (.sql) file that is produced during build, as part of inputs for ProjectB.

    To try this, copy the [ProjectName]_Package.sql file from ProjectA to the Pre-Deployment folder of ProjectB and see if the verification process then works for ProjectB. Depending on the layout of your organization's source control -- you mention that these projects won't be part of the same solution but not whether they're in the same repository -- but if they're in the same repo you could potentially have a Pre-Build event in ProjectB that automatically builds ProjectA and copies the package file to itself.

    I must stress that this isn't something to my knowledge that any of customers are doing currently, however it may provide a way to segment the projects as needed. One scenario I wouldn't recommend this for is if ProjectA and ProjectB are both making changes to the static data in the table. In which case, I'd recommend having only one project.

    An alternative to the above might be to use the offline static data method, as this does not require the ReadyRoll tool-window's verification process to be used to generate scripts.
    Daniel Nolan
    Product Manager
    Redgate Software
Sign In or Register to comment.