Here's another direction to look in: we use the liquibase library to perform schema updates for our application (for MySQL, SqlServer, and Oracle in our case, but they do support h2 as well). In our case, we have one database, update the schema, and there are hooks for doing data transformations along the way as well. It's not quite your use case since you have an old db and want to create a new one rather than upgrading your old one, but it may help you anyway. Not sure how its speed would compare to what you're doing.
-Sandeep On Tuesday, June 12, 2012 7:39:55 AM UTC-7, vicenrico wrote: > > Hello!. > I'm a software developer who has a program to catalog movies. > I have two questions that I would like you to ask me, please. > My program is currently version 1.0. > I have a table, for example: > > Table (long id, long key, String title, String category, Date year ) > > I would like to import data from older versions, as could be, for instance: > > TableOld ((long id, long key, String title, String year) > > Of course, my tables have a lot of columns, but I think with these you can > undertand what my problem is. > > My questions: > > I want to import old data (tableold) to my current database which is > already open (with ist own tables already created). > > 1) What is the best way to import data from tableold( a *data.db file in > my computer) to Table (that is currently opened). Should I use merge, or > create linked tables? > 2) In the "year" case, in my old db was a String , but I want to convert > to Date when doing the import. Is there a good way to convert "on the fly", > I mean, while importing? > > Thanks > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/pF0PpssMeaAJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
