This mode uses an upgrade table to store existing data from the business data table. You must create the upgrade table manually in advance before introducing the change. To create the upgrade table, you save the table you are about to change as another table with an ID in the upgrade toolkit range. Then, you remove the C/AL code from the triggers, and clean up the properties referencing other tables without the field specification, because all the data will be moved.
The upgrade table must be identical to the existing business data table, including the primary key and the fields.
When the schema is synchronized, if there is data in the field of business data table that is affected by the table definition change, then the data is deleted from the business data table and moved to the upgrade table. Then, the schema changes are applied to the business data table. When the synchronization is completed, the business data table will be empty but its schema will match the table definition. If there is no data in the field that is affected by the table definition change, then the changes are simply applied to the business data table.
If required, you can then write code to copy necessary data from the upgrade table into the new table.
Answers
Copypaste from docs:
Microsoft Dynamics NAV | App Service Engineer | Comments are my own
go.microsoft.com/fwlink/?LinkID=509977
This has a scenario of deleting fields in a table. Once you create the upgrade codeunit, you can open the original table and delete the fields. The copy to the upgrade table will happen automatically.
It then says "The same would also happen if instead of deleting the fields in the table directly you would import a FOB file with another version of the Vehicle table where these fields are absent."
So what about the scenario where you have built the upgrade codeunit and upgrade table and have a new table definition with fields removed, and you are moving this to a copy of the database, e.g. from Development to Test or Test to Production?
Does this mean you need to import the Upgrade codeunit and upgrade table FOB's first. Then, once they are in the database, you can import the new table definition?
Ron