Hi Sander,
This is a difficult process that I have had to go through a few times. Here are some tips to help you.
First of all, when adding the attribute make sure that there is no default value set. If you set the default value to 0 or some other value then the database synchronization in the Mendix cloud will time out during startup.
Second, instead of using the process queue and Mendix microflows, do the migration using SQL, which is much faster. Here is how to get a database connection in Mx 6
// make sure to add the jdbc driver for postgresql in userlib
String url = "jdbc:postgresql://$HostName:$PortNumber/$DatabaseName";
JDBCDataStoreConfiguration jdbcSetting = Core.getConfiguration().getDataStoreConfiguration();
url = url.replaceAll("\\$HostName", jdbcSetting.getHostName())
.replaceAll("\\$PortNumber", ""+jdbcSetting.getPortNumber())
.replaceAll("\\$DatabaseName", jdbcSetting.getDatabaseName())
DriverManager.getConnection(url);
With this connection you can execute SQL commands directly on the cloud database.
Finally, you need to find a way to prevent people from using the app while the database operation is running. You can do this most easily by preventing users from logging in. If you use an SSO you can usually deactivate it with a constant so that only local users i.e. MxAdmin can log in.
Hope this helps,
Andrej
Have you considered addingthe attribute in a new entity with a 1-1 relation with your current entity?
It may not work in your case but one approach could be to make the update less urgent by finding the records that are most likely to be accessed (or make code update records when they are requested). And then update the rest of the records as a background process that does not require downtime