Hi,

I think this issue was resolved in version 1.4.179, see the changelog entry:

   - Databases created with version 1.3.175 and earlier that contained
   foreign keys in combination with multi-column indexes could not be opened
   in some cases. This was due to a bugfix in version 1.3.176: Referential
   integrity constraints sometimes used the wrong index.

I suggest to use a recent version of H2, but append ";mv_store=false" to
the database URL.

Worst case, you would need to export the database to a SQL script with an
old version, and re-created it from the script in the new version.

Regards,
Thomas


On Fri, May 22, 2015 at 6:29 PM, Carson <[email protected]> wrote:

> Hi,
>
> I'm new to H2, and I have to work with an pre-existing h2 database. So
> basically, when I first access the database through the console, I manage
> to log in. However, after disconnecting, and trying to re-access it, I get
> the following error:
>
> Unique index or primary key violation: "PRIMARY KEY ON """".PAGE_INDEX";
> SQL statement:
> ALTER TABLE PUBLIC.PPT_TEMPLATE ADD CONSTRAINT PUBLIC.CONSTRAINT_21
> FOREIGN KEY(ID_TEMPLATE) REFERENCES PUBLIC.PPT_TEMPLATE(ID_TEMPLATE)
> NOCHECK [23505-176]
>
>
> The only way for to re-access it is to get a fresh copy in git, but
> everytime, after I access it, I won't be able to re-access it... Can anyone
> pinpoint me to where I may be able to solve this issue?
>
>
> My database version is 1.3.176 (I took the version shown on the tab when I
> open the database through the H2 console tab)
>
> My URL is: jdbc:h2:C:\Users\Carson\db\PPT_DB;CIPHER=AES
>
> --
> 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.
>

-- 
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.

Reply via email to