There are two very important aspects to keep in mind:
1. Always use incremental migration scripts for each particular database. Use
Flyway to manage the schema version updates.
2. You can define the common mappings using annotations, and only override the database-specific mappings using orm.xml configuration files. Check out
this article for more details for an example of how you can override a default SEQUENCE identifier with an IDENTITY one for MySQL.
Having a core mapping will allow you to minimize duplication, while still allowing you to diverge one DB from the other.