code: protected boolean writeMigration(Migration dbMigration, String version) {
          if (migrationModel.isMigrationTableExist()) {
              scriptInfo = server.find(ScriptInfo.class, version);
              if (scriptInfo != null) {
                  return false;
              }
          }
          scriptInfo = new ScriptInfo();
          scriptInfo.setRevision(version);
          try (StringWriter writer = new StringWriter()) {
              JAXBContext jaxbContext = JAXBContext.newInstance(Migration.class);
              Marshaller marshaller = jaxbContext.createMarshaller();
              marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
              marshaller.marshal(dbMigration, writer);
              writer.flush();
              scriptInfo.setModelDiff(writer.toString());
          } catch (JAXBException | IOException e) {
              throw new RuntimeException(e);
          }
          return true;
      }
docs: <p>writeMigration.</p>
  
  @param dbMigration a {@link io.ebeaninternal.dbmigration.migration.Migration} object.
  @param version     a {@link java.lang.String} object.
  @return a boolean.