uchicago / shibboleth-oidc

OpenID Connect support for the Shibboleth Identity Provider v3
Apache License 2.0
81 stars 19 forks source link

Schema for other database engines? #26

Closed edysli closed 8 years ago

edysli commented 8 years ago

Your conf/schema.sqlis for MySQL/hsqldb. Do you know if MITREid has schemas for other database engines? I'm looking for PostgreSQL in particular.

mmoayyed commented 8 years ago

I do not, and they probably don't.

mmoayyed commented 8 years ago

If you end up creating one though, feel free to submit a patch please. I don't think the change in syntax is all that hard, is it? What's breaking?

mmoayyed commented 8 years ago

Actually, if you query the mailing list, I am sure there may be others who might have done this schema for Postgres and might be willing to share :)

edysli commented 8 years ago

I haven't tried it in Postgres so far so nothing is broken yet. ;) The table definitions seem to be missing a lot of foreign key constraints.

mmoayyed commented 8 years ago

Let me know if I can be of further assistance. As far as I can tell, Hibernate generates all those FKs but they may be a few anomalies with postgres.

edysli commented 8 years ago

I tried loading conf/schema.sql in Postgresql and got this error:

psql:/opt/shibboleth-idp/conf/schema.sql:32: ERROR:  syntax error at or near "GENERATED"
LINE 2:   id BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) P...

Then I found the schema for PG here https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server/blob/master/openid-connect-server-webapp/src/main/resources/db/tables/psql_database_tables.sql and it loads without error.

mmoayyed commented 8 years ago

Cool.

mmoayyed commented 8 years ago

@edysli I updated the readme to note support for other schemas and databases. Included the schemas as well. Thanks for the feedback :)