Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create DDL #22

Open
aaime opened this issue Oct 7, 2014 · 2 comments
Open

Create DDL #22

aaime opened this issue Oct 7, 2014 · 2 comments

Comments

@aaime
Copy link
Member

aaime commented Oct 7, 2014

Issue by etj
Thursday Nov 28, 2013 at 11:49 GMT
Originally opened as https://github.com/geosolutions-it/geofence/issues/84


It is needed that the DDL file be automatically created according to the DBMS profile.

This is used in production environments to create the schema for GeoFence DB.

@aaime
Copy link
Member Author

aaime commented Oct 7, 2014

Comment by etj
Thursday Nov 28, 2013 at 11:54 GMT


Note that files in https://github.com/geosolutions-it/geofence/tree/master/doc/setup/sql were created automatically by hibernate and then copied to that dir manually every time the model changed.

Also note that the Oracle Spatial directives were fixed by hand in those scripts, since the schema names created by the used hibernate version were wrong.

@etj
Copy link
Member

etj commented Sep 30, 2015

Here another problem related to the creation of the schema in an Oracle DB:
http://sourceforge.net/p/geoserver/mailman/message/34502447/

During startup of geofence I see the following in my tomcat log:

17:25:09,357 ERROR SchemaUpdate:212 - Unsuccessful: create table FDOTWEBSVC.gf_layer_attributes (details_id number(19,0) not null, access_type varchar2(255 char), data_type varchar2(255 char), name varchar2(255 char) not null, primary key (details_id, name), unique (details_id, name))
17:25:09,358 ERROR SchemaUpdate:213 - ORA-02261: such unique or primary key already exists in the table

If I execute the SQL that's shown in Oracle's sqlDev I see this error output:
SQL Error: ORA-02261: such unique or primary key already exists in the table
02261. 00000 - "such unique or primary key already exists in the table"
*Cause: Self-evident.
*Action: Remove the extra key.

We should probably completely deprecate the automatic schema generation and rely on the DDL only, at least for Oracle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants