I attached the db which only contains the necessary tables. It works
if I drop the foreign keys. But I used it with liquibase and don't
like it to have there always special statement for h2. Furthermore I
don't understand why the foreign keys are the problem.
I drop the fk and recreate them after that I can drop the index. Looks
like a bug to me.
I added the SQLs
This is what liquibase said it will do:
ALTER TABLE PUBLIC.ZEUGNIS_FORMULAR ADD CONSTRAINT FK62F9A9906105B64D
FOREIGN KEY (SCHULHALBJAHR_ID) REFERENCES PUBLIC.SCHULHALBJAHR (ID) ON
UPDATE RESTRICT ON DELETE RESTRICT;
ALTER TABLE PUBLIC.ZEUGNIS_FORMULAR ADD CONSTRAINT FK62F9A99040A05D6E
FOREIGN KEY (KLASSE_ID) REFERENCES PUBLIC.KLASSE (ID) ON UPDATE
RESTRICT ON DELETE RESTRICT;
CREATE UNIQUE INDEX UK_ZEUGNIS_FORMULAR_HALBJAHR_KLASSE_BESCHREIBUNG
ON ZEUGNIS_FORMULAR(KLASSE_ID, SCHULHALBJAHR_ID, BESCHREIBUNG);
This is what I found in the systems tables:
ALTER TABLE PUBLIC.ZEUGNIS_FORMULAR ADD CONSTRAINT
PUBLIC.FK62F9A9906105B64D FOREIGN KEY(SCHULHALBJAHR_ID) INDEX
PUBLIC.FK62F9A9906105B64D_INDEX_1 REFERENCES PUBLIC.SCHULHALBJAHR(ID)
NOCHECK
ALTER TABLE PUBLIC.ZEUGNIS_FORMULAR ADD CONSTRAINT
PUBLIC.FK62F9A99040A05D6E FOREIGN KEY(KLASSE_ID) REFERENCES
PUBLIC.KLASSE(ID) NOCHECK
CREATE UNIQUE INDEX
PUBLIC.UK_ZEUGNIS_FORMULAR_HALBJAHR_KLASSE_BESCHREIBUNG ON
PUBLIC.ZEUGNIS_FORMULAR(KLASSE_ID, SCHULHALBJAHR_ID, BESCHREIBUNG)
Hope that someone can give me some hints what I must provide to get help.
Niels
2012/10/18 niels <
openso...@gmail.com>:
> --
> 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/-/Ab730i_V76gJ.
> To post to this group, send email to
h2-da...@googlegroups.com.
> To unsubscribe from this group, send email to
>
h2-database...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/h2-database?hl=en.