@@ -0,0 +1,1145 @@
+package db.migration;%0A%0Aimport org.flywaydb.core.api.migration.spring.SpringJdbcMigration;%0Aimport org.springframework.jdbc.core.JdbcTemplate;%0A%0A/**%0A * Created by emma on 06/04/2016.%0A *%0A * @author emma%0A *         %3Cp%3E%0A *         Copy OR and DESCRIPTION values to BETA_NUM, BETA_UNIT and BETA_DIRECTION in ASSOCIATION table%0A */%0Apublic class V2_1_2_015__Migrate_remaining_beta_values implements SpringJdbcMigration %7B%0A%0A    // Migrate all remaining beta values%0A    private static final String SELECT_ASSOCIATIONS =%0A            %22SELECT ID, OR_PER_COPY_NUM FROM ASSOCIATION WHERE OR_TYPE = 0 AND OR_PER_COPY_NUM IS NOT NULL%22;%0A%0A    private static final String UPDATE_ASSOCIATION =%0A            %22UPDATE ASSOCIATION SET BETA_NUM = ?, OR_PER_COPY_NUM=? WHERE ID = ?%22;%0A%0A    @Override%0A    public void migrate(JdbcTemplate jdbcTemplate) throws Exception %7B%0A%0A        jdbcTemplate.query(SELECT_ASSOCIATIONS, (resultSet, i) -%3E %7B%0A            Long id = resultSet.getLong(1);%0A            float betaNum = resultSet.getFloat(2);%0A%0A            // Run update%0A            jdbcTemplate.update(UPDATE_ASSOCIATION, betaNum, null, id);%0A            return null;%0A        %7D);%0A    %7D%0A%7D

Migrate final beta values