The purpose of these scripts is to re-align the pl/sql scripts as per directory structures in TFS and change local caller scripts accordingly
TFS Scripts Directory | Local Scripts Directory |
---|---|
TFS Caller script | Local Caller script |
- All table scripts ends with .tab
- all views scripts ends with .vw
- all init scripts ends with _init.sql
- all package scripts ends with .pks or pkb
- All local caller scripts ends with run.sql
- Download the url from github.
- Open powershell and go to [tfs_scripts] folder
- Execute the Powershell script CreateFolders.ps1
& ".\CreateFolders.ps1"
- Create or copy local schema folders with object scripts and caller scripts in \tfs_scripts\z_WIP\
- Update \tfs_scripts\z_WIP\CallerScripts\header.sql to include deployment instructions or spool file detatils.
- Execute the Powershell script CreateTFSfolders.ps1
& ".\CreateTFSfolders.ps1"
- Execute the Powershell script ParseTFSscript.ps1
& ".\ParseTFSscript.ps1"
Script name | Folders generated | Description |
---|---|---|
GitHub Download | \tfs_scripts | Root folder that contains scripts |
CreateFolders.ps1 | \tfs_scripts\z_WIP \tfs_scripts\Releases |
Create template folders for generating local scripts |
CreateTFSfolders.ps1 | \tfs_scripts\Schema1 \tfs_scripts\Schema2 |
Create schema folders and its respective object folders as per TFS structure |
ParseTFSscript.ps1 | \tfs_scripts\Releases\Module1\module1_tfs.sql | Parse the script file as per TFS structure |
This script will create folder templates in current directory along with sample script files.
This script will loop through all schema folders in ".\z_WIP" and will copy the files to TFS respective schema\object folders
- For eg all the table scripts in .\z_WIP<Schema'n'> will be copied to .<Schema'n'>\Tables
- Similar operation will happen for init, view, Packages and Tables scripts.
This script will parse the script file \Releases\Module1\module1_tfs.sql and add tfs folder location prefixes (as shown above in table)