Hi Thomas,

I'm afraid I don't have any stack traces or other error messages 
resulting from this.  I ended up solving my problem in another way.  My 
recollection is that the "User" table just plain didn't show up when I 
added the MODE option, but only if the MODE were first in the list of 
options.  However, when I moved the DB_CLOSE_DELAY option to anything 
but first in the list, I had tests that failed with the "table already 
exists" error.  I think my test infrastructure was trying to recreate 
the database for each test case.

In the end, I got away from using the MODE option by setting up a 
special "test" context for the changeset in question.  It turns out that 
MySQL and H2 have a slightly different syntax for altering a column on a 
table:  "ALTER TABLE tablename MODIFY COLUMN" for MySQL vs. "ALTER TABLE 
tablename ALTER COLUMN" for H2.  So, it was easy enough for me to get 
around the issue.

The URL was:

    jdbc:h2:mem:harvey;MODE=MySQL;DB_CLOSE_DELAY=-1

Of course, changing the order of the options gave me different results.

If it will help, I can try to reproduce the earlier issues.  I certainly 
don't mind helping the software I use get better.
Thanks,
Dave

Thomas Mueller wrote:
> Hi,
>
> What is your exact database URL and what is the exact error message
> and stack trace?
>
>   
>> Running my Liquibase changelog now produces lots of
>> "table already exists" errors.
>>     
>
> Most likely the table do already exist. I don't think H2 will throw
> this exception if not.
>
>   
>> Without that mode, I have a case where trying to create the table
>> "User" fails.
>>     
>
> What exception do you get? For H2, USER is not a reserved word. For
> the list of reserved words, see
> http://www.h2database.com/html/advanced.html#compatibility
>
> Regards,
> Thomas
>
> >
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to