How to get Nuxeo to update the DDL of the users table when adding new fields ?
Hi everybody!, I'm attempting to add a new property to the user profile. I followed the documentation # Add New Fields to the User Profile or Group Profile and made the required changes in nuxeo studio, then, I performed a hot reload, and restarted the nuxeo server, but nuxeo did not create the new property in the database automatically, and I discovered the following error in the “nuxeo-error.log” file:
Caused by: org.postgresql.util.PSQLException: ERROR: column "community" does not exist
Position: 19
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
at org.nuxeo.ecm.directory.sql.SQLSession.getEntryFromSource(SQLSession.java:133)
to solve the problem, I had to update the user table ddl myself with the following sql request:
ALTER TABLE users ADD community varchar(255);
So, my question is, is there an option to put in the nuxeo.conf file so that nuxeo updates the ddl (Data Definition Language) if the schema of an entity has been changed ?
Hello Belgacem,
If you've followed the documentation page, it should work without doing any kind of operation on the underlying database, being Postgres, Mongo or any other. So I guess this should be probably a bug related to Postgres, it would be great if someone else can reproduce it (I'm not aware of it).
Thx