@waviles I would like to repeat not to delete flyway table at any cost. But I assume you have already done it. Hoping its not a production database. Deleting the flyway table will have more consequences in future.
This error indicates that you tried to deploy 2.36-SNAPSHOT at some point onto this specific database. Which means your db has got migrations well into the development versions of 2.36 (which are to be released in 2.36.3 patch version or so), and these migrations are not released as part of the 2.36.2 patch release.
It basically means you tried to downgrade from a “higher” version to a “lower version” of dhis2. If this is only a test instance, then simply removing the specific rows for the “versions” mentioned in the error will fix it. Not the entire table . Example: delete from flyway_schema_history where version=‘2.36.37’.