Hi,
last week we've installed XWiki running on Tomcat with Postgres. There were some
changes necessary with the database layout for Postgres, therefore I wanted to submit the
changes we did.
--------- changes-xwiki-postgres.sql
/* This SQL-file consists some changes necessary to use XWiki together
* with PostgreSQL. The changes are tested. They have to be applied
* during installation, otherwise XWiki won't work.
*/
/* Copied from
http://www.xwiki.org/xwiki/bin/view/Dev/PostgresDatabase
* Thanks Artem.
*/
ALTER TABLE xwikiclassesprop ALTER xwp_unmodifiable TYPE boolean USING
xwp_unmodifiable=1;
ALTER TABLE xwikidblistclasses ALTER XWL_MULTISELECT TYPE boolean USING
XWL_MULTISELECT=1;
ALTER TABLE xwikidblistclasses ALTER XWL_RELATIONAL TYPE boolean USING XWL_RELATIONAL=1;
ALTER TABLE xwikislistclasses ALTER XWL_MULTISELECT TYPE boolean USING XWL_MULTISELECT=1;
ALTER TABLE xwikislistclasses ALTER XWL_RELATIONAL TYPE boolean USING XWL_RELATIONAL=1;
/* Changed after errors during file upload were discovered:
* xwikiattachment_archive.xwa_archive: type text --> type bytea
* xwikiattachment_content.xwa_content: type text --> type bytea
*
* Altering the data type at once is not possible, Postgres
* can't cast from text to bytea. This error is even reported
* if the table is empty.
*/
ALTER TABLE xwikiattachment_archive DROP COLUMN xwa_archive;
ALTER TABLE xwikiattachment_archive ADD COLUMN xwa_archive bytea;
ALTER TABLE xwikiattachment_content DROP COLUMN xwa_content;
ALTER TABLE xwikiattachment_content ADD COLUMN xwa_content bytea;
---------
HTH
Best regards,
Fabian.