What is the difference in usage of Sync-NavApp and Sync-NAVTenant

Sometimes I’m lost in quantity of new commands for NAV in PowerShell which MS release.

E.g. we have 2 commands - Sync-NavApp and Sync-NAVTenant.

I can read the description for:

  • Sync-NavApp - “Use the Sync-NAVApp cmdlet to synchronize the schema changes from an app to a tenant database.” (docs.microsoft.com/…/sync-navapp))

  • Sync-NAVTenant - “Use the Sync-NAVTenant cmdlet to synchronize the database schema in a tenant database with the schema in the application database. The application database contains tables that define the application. The tenant database must contain the SQL Server tables that the application prescribes.” (docs.microsoft.com/…/sync-navtenant))

Case:

we have Extension and I want to install it.

I wrote the script (just run part):

Publish-NAVApp -ServerInstance $ServerInstance -Path $FullPath -SkipVerification -ErrorAction Stop

#Sync-NavApp -ServerInstance $ServerInstance -Path $FullPath -Force -ErrorAction Stop
Sync-NAVTenant -ServerInstance $ServerInstance -Tenant $_.ID -Mode ForceSync -Force -ErrorAction Stop

Install-NAVApp -ServerInstance $ServerInstance -Path $FullPath -ErrorAction Stop

The question - what do I need to use - either 1 or 2nd from:

Sync-NavApp -ServerInstance $ServerInstance -Path $FullPath -Force -ErrorAction Stop
Sync-NAVTenant -ServerInstance $ServerInstance -Tenant $_.ID -Mode ForceSync -Force -ErrorAction Stop

P.S. Source for this question is during installation receiving the error:

Install-NAVApp : The following SQL error was unexpected:
Invalid column name ‘FSp Automatically Posted’.