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

Make the array of databases dynamic (configurable) via external call #3

Open
suxstellino opened this issue Mar 23, 2018 · 0 comments
Open

Comments

@suxstellino
Copy link
Member

Load the database list from an external call (API? JSON file?) instead of the current hard-coded implementation. This allows the tool to get the list of databases to manage dynamically.

#database scope settings (list of custom database "scope", scope is the "meaning" of the database and it needs the branch name for being a complete name)
$DB1Scope = 'DB1'
$DB2Scope = 'DB2'
$DB3Scope = 'DB3'
#database scripts (you can change the names of each script, and also the text within them)
$DB1CreationScript = '01 - Create database DB1.sql'
$DB2CreationScript = '02 - Create database DB2.sql'
$DB3CreationScript = '03 - Create database DB3.sql'
#endregion

#region WORKING VARIABLES

# list of needed database (specify the position = specify the sorting of scripts execution, if you need any)
$DB1Name = $DB1Scope+"_"+$BranchSuffix
$DB2Name = $DB2Scope+"_"+$BranchSuffix
$DB3Name = $DB3Scope+"_"+$BranchSuffix

$databases = (
        ($DB1Scope, $DB1Name, $DB1CreationScript, 1),
        ($DB2Scope, $DB2Name, $DB2CreationScript, 2),
        ($DB3Scope, $DB3Name, $DB3CreationScript, 3)
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant