Hi again, After some trial and error I figured out the ARRAYs in H2 need to be typed now in v2.x, defined e.g. as "VARCHAR(100) ARRAY ".
Perhaps I should file a ticket to consider updating the syntax error message to help other devs. Cheers, On Wednesday, 5 January 2022 at 00:09:38 UTC+2 Vladimir Dzhuvinov wrote: > Hi all, > > We decided to bite the bullet and start a migration towards the new 2.x :) > > The online docs / diagrams - are they now up to date with the 2.x SQL? > > We are having difficulty interpreting this message: > > Syntax error in SQL statement "CREATE TABLE IF NOT EXISTS subject_sessions > (id VARCHAR(500) NOT NULL, tid VARCHAR(50) NOT NULL, sub VARCHAR(500) NOT > NULL, auth_ts TIMESTAMP NOT NULL, acr VARCHAR(500), amr ARRAY[*], > creation_ts TIMESTAMP NOT NULL, access_ts TIMESTAMP NOT NULL, max_life > BIGINT DEFAULT -1, auth_life BIGINT DEFAULT -1, max_idle BIGINT DEFAULT -1, > claims VARCHAR(10000), rps ARRAY, data VARCHAR(10000), PRIMARY KEY (id, > tid))"; expected "IDENTITY, BIGSERIAL, SERIAL, data type"; > > This is from a create table statement used with 1.4.200. > > The intent is to have a primary key over the "id" and "tid" columns, of > type VARCHAR. > > Cheers, > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/4c97b687-5c65-415e-823b-31dac6274b41n%40googlegroups.com.
