Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Journaling to a single DB, when working with multiple DB #146

Open
c-Raymart opened this issue Jul 1, 2022 · 1 comment
Open

Journaling to a single DB, when working with multiple DB #146

c-Raymart opened this issue Jul 1, 2022 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@c-Raymart
Copy link

Hi,

I'm working with multiple database and executing all the files in a single transaction.
This is my sample command.
Install-DBOScript -ScriptPath ${{github.workspace}}\applications\scripts* -SqlInstance $dbServer
-Database test_db -Credential $sqlcredential

All my sql scripts should define the database in the first line of each file with the following command USE database_name.

The problem after executing a script of other databases, filename didn't save in the (schemaversions) of db where I initially connected (test_db in sample above). In result the sql file of other databases rerun again (once I re-run the pipeline).

Currently my work around is to add a command "USE test_db" at the end of each sql file.

Any thoughts?

@nvarscar
Copy link
Collaborator

nvarscar commented Jul 3, 2022

I'm not sure if something like this would be possible. Your workaround seems to be a way to go if you want to achieve something like this.

Seems like theoretically a journal could be defined with a separate connection string (though it didn't work for the OP):
DbUp/DbUp#566

Similar to #127

Seems like it should be possible to journal to a specific database. I might play with it at some point. Thanks for the idea.

@nvarscar nvarscar added enhancement New feature or request question Further information is requested labels Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants