@Arshadullah Khan
Upgrade your Ambari Server database to a current supported version, only if your Ambari Server database version is not supported on the target Ambari version.
To verify current supported versions, see theHortonworks Support Matrix.
For example, if you are running postgres v9.4, you must upgrade postgres to v9.6 or v10.2. If you are running MariaDB 10.2, upgrading the Ambari Server database is not required.
https://docs.hortonworks.com/HDPDocuments/Ambari-2.7.0.0/bk_ambari-upgrade-ppc/content/upgrade_ambar...