I'm using H2 to JUnit test a system that will run using MS SQL Server in production.
As part of the latest version I need to make some DDL changes and migrate data from the old structure to the new. And that will involve copying data into a new table that has an identity column.
I'm actually splitting a single table into two. Going forward the new table will have an independent (identity) primary key, but for initialization it needs to have the same value for the primary key as the original table (i.e. on migration it's one-to-one, afterwards it will be one-to-many).
I don't mind having H2 and SQL Server specific code in the system (the DDL is already system specific) as long as the resulting structure is equivalent, so if there is an H2 option or a JDBC trick that will achieve this that'd be fine.
Everything is being run using the Spring JdbcTemplate.
Thanks for any suggestions.