Skip to main content

Hi All,

We have upgraded to the latest version and that went ok. 
Our automated deployment however, is off. 

Before, after all merges where done, we copied the latest version to a new version. So for example from 1.125.06 to 1.26. 
Set this as ‘production’ - set the previous version to 1.125 and the 020-upgrade script came out great. 

We then keep track of the executed scripts in _schemaversions, so we know if the script is executed on the db or not. 

 

Yesterday I found out that this is no longer working ok. Lot of Db issues, and as stated here that it might ruin the Db. Well, it does. 

 

In model Overview, I have a Branch ‘Main’ (prev. trunk) and several model versions. My build tool Calls the ‘deployment package task’. But all upgrades scripts are based on the version since the upgrade. So now in my repo I have three version; 

Version 004; 020 upgrade script 

“print 'Upgrade from MAIN (2023-02-07 16:21:11.24) to MAIN (2023-02-09 15:48:52.72)”

Version 005; 020 upgrade script 

“print 'Upgrade from MAIN (2023-02-07 16:21:11.24) to MAIN (2023-02-14 12:46:33.47)”

Version 006; 020 upgrade script 

print 'Upgrade from MAIN (2023-02-07 16:21:11.24) to MAIN (2023-02-15 11:55:38.99)”

Which obviously fails on all possible ends, with domains/functions and everything already existing in the Db. 

 

IN the Data migration overview I can set the ‘Source model’ so, after figuring that out and toying with the ‘Set source for data migration and upgrade’, the script were ok(-ish). However, I don’t understand what the ‘Obtain from Db’ does. I DO have this in the Generate Definition task. But not in the Deployment Package Task. And the runtime config does connect (or at least is set to the correct) test data db, but i’m not sure if any data/info is retrieved/used. 

All in all a wee bit lost in this. 

  • Is automated deploy with just the Deployment package still useable?
  • Do I have to set the Model source manually every time? (like with previous version)
  • How does ‘Obtain from Db’ work?
  • How can we deploy the same version again, for a hotfix in a certain version?

 Thanks for thinking along. 

Alex

 

 

  • Is automated deploy with just the Deployment package still useable?
  • Do I have to set the Model source manually every time? (like with previous version)

If you deploy from the SF you can use obtain from DB. When using deployment package please check this topic:

  • How does ‘Obtain from Db’ work?

    Obtain from DB checks what the last deployed named version/ or timestamp version on the database is and applies the changes made inbetween.  
     
  • How can we deploy the same version again, for a hotfix in a certain version?

Versions no longer exists so you can't deploy the same version. So you either treat main as "production” or you create a dedicated production branch. For every development cycle you can create a branch to keep the the main branch inline. When deploying the main or branch with the hotfix you can create a named version adding a hotfix number to the named version to keep track of the changes made to the main/production branch. 


In some scenario's where you really need to make modifications to a certain point in time you could create a branch from a specific named version/point in time. then in the branch make the modifications and sync this to production. This will however mean that your main is no longer inline with the production version.