Solved

Missing sf_product_info insert script in Deployment package 'smart'

  • 10 April 2020
  • 5 replies
  • 125 views

Userlevel 5
Badge +15

When I create a Deployment Package I notice a difference between the upgrade methods “Smart” and “Full”, also described here: https://docs.thinkwisesoftware.com/docs/sf/creation.html#3-generate-source-code.

We often have small changes, so using the upgrade method ‘smart’ is preferred, because a ‘full’ update is quite heavy and can take a while. But when choosing for ‘smart’, the script ‘020_Upgrade.sql’ isn't (always) created. I have this situation for example when I only change a query in a view (no model changes).

Why isn't there a 020_Upgrade.sql containing an update of sf_product_info table generated when having only some minor changes?

icon

Best answer by Erwin Ekkel 14 April 2020, 08:51

View original

5 replies

Userlevel 6
Badge +16

What version of the software factory are you using?

Userlevel 5
Badge +15

What version of the software factory are you using?

2020.1.

Userlevel 3
Badge +11

When I create a Deployment Package I notice a difference between the upgrade methods “Smart” and “Full”, also described here: https://docs.thinkwisesoftware.com/docs/sf/creation.html#3-generate-source-code.

We often have small changes, so using the upgrade method ‘smart’ is preferred, because a ‘full’ update is quite heavy and can take a while. But when choosing for ‘smart’, the script ‘020_Upgrade.sql’ isn't (always) created. I have this situation for example when I only change a query in a view (no model changes).

Why isn't there a 020_Upgrade.sql containing an update of sf_product_info table generated when having only some minor changes?

 

I have noticed the same. I am using 2019.1. 

Userlevel 6
Badge +16

Indeed this part is skipped when there are no model changes. Please report this as a bug. 

Userlevel 3
Badge +5

​Thanks for reporting the bug (in TCP). This bug will be fixed with 2021.1.  

 

The record in product info is used by the software factory to determine if the upgrade script needs to be checked in Creation - Execute source code. Or that the upgrade has already been executed and the upgrade does not need to be checked. Therefore, it was not necessary to add this when there is nothing else in the upgrade script.   

But I understand that it is useful for you to see which version the database is. Therefore the prog object that is responsible for the insert will be always on.  

 

For now, you can workaround this by adding a dynamic CP with the following code: ​

update prog_object​
set prog_object_status = 1 -- selected_by_default
​where project_id = @project_id​
and project_vrs_id = @project_vrs_id​
and prog_object_id = 'ug_sf_product_info'​

 

Note, please remember to remove this workaround after upgrading to 2021.1.​ ​

Reply