nursultannd
Posts: 3
Joined: Wed May 12, 2021 9:18 am

SQL Query Script

Wed Nov 17, 2021 8:01 pm

Hello,

In our installers, we use SQL scripts file that changes on every installer version. Our script file is generated by TeamCity and also our installer is generated from TeamCity. Firstly, I thought that if I set up the SQL script file on the installer project by SQL query, and by replacing the script file on the folder without changing a name can cause the installer to update its SQL script file content on every build. However, the installer doesn't update the script file. And then I tried to update it by TeamCity and Command-line instructions just like changing the version. However, I haven't found any command related to updating the script file. So, can you please suggest me workaround for this problem?

Liviu
Posts: 1035
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: SQL Query Script

Fri Nov 19, 2021 12:30 pm

Hi,

I'm not sure I understand your scenario.

The content of the files is loaded when you build your project. However, The OS does not guarantee that the file dates are updated in real time so there might be situations when the cached archives are used even if a source file content has been modified (without changing its dates and size). You should always rebuild the project for your release deployments to make sure that the newest source files are used.
rebuild.png
rebuild.png (35.94KiB)Viewed 4511 times
However, the installer doesn't update the script file.
By that you mean that the SQL Script File preview is not changed when you update your file? For that you need to change the view, just select another page and after that if you open the SQL Script the preview is updated.
sql preview.png
sql preview.png (38.41KiB)Viewed 4511 times
I've also tested this with two version of the script and installing the package everything worked as expected. The updated script was executed successfully (when I edited the .sql file in notepad).

If possible, could you please give me some more details about how to reproduce this issue. If it is easier for you, you could create a sample project that reproduces this and forward it to me as well.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”