2015-09-21 6:59 GMT+02:00 Cecil Westerhof <[email protected]>:
> 2015-09-21 2:06 GMT+02:00 Mike Goodwin <[email protected]>:
>
>> I think the best your going to do is export to SQL and then reimport that
>> (making any necessary compatability)
>>
>> SCRIPT TO 'export.sql'
>>
>> http://www.h2database.com/html/grammar.html#script
>>
>
> I already use this for backups. I thought that there where differences
> between the SQL syntaxes, but I can always try. I will try this and let the
> result be known.
>
It works better as I thought. I thought that SQLite only knew the
data-types NULL, INTEGER, REAL, TEXT and BLOB. But changing:
CREATE CACHED TABLE PUBLIC.AUTHORS(
AUTHORID UUID NOT NULL,
AUTHOR VARCHAR NOT NULL
);
to
CREATE TABLE authors(
authorID UUID NOT NULL,
author VARCHAR NOT NULL,
PRIMARY KEY (authorID)
);
seems to work.
I have to drop the CREATE USER.
For the insert I need to change:
INSERT INTO PUBLIC.AUTHORS(AUTHORID, AUTHOR) VALUES
into:
INSERT INTO authors(authorID, author) VALUES
But just removing PUBLIC. should be enough.
So it looks like it is manageable.
> On Sun, Sep 20, 2015 at 6:01 PM, Cecil Westerhof <[email protected]>
>> wrote:
>>
>>> I need to convert a H2 database to SQLite. Are there tools to do this,
>>> or do I have to program it myself?
>>>
>>
> --
> Cecil Westerhof
>
--
Cecil Westerhof
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.