SETUP: main upgrade Database error: Invalid SQL: CREATE TABLE phpgw_vfs (file_id int4 NOT NULL DEFAULT nextval('seq_phpgw_vfs'), owner_id int4 NOT NULL, createdby_id int4, modifiedby_id int4, created date NOT NULL DEFAULT 1970-01-01, modified date, size int4, mime_type varchar(150), deleteable char(1) DEFAULT 'Y', comment text, app varchar(25), directory text, name text NOT NULL, link_directory text, link_name text, version varchar(30) NOT NULL DEFAULT '0.0.0.0', content text, PRIMARY KEY(file_id)) PostgreSQL Error: 1 (ERROR: Column "created" is of type date but default expression is of type integer You will need to rewrite or cast the expression ) Solved removing: 'default' => '1970-01-01' from phpgwapi/setup/tables_update.inc.php. As you can see the problem arise bacause there's no ' around the date, and i was not able to put here. SETUP: main upgrade Database error: Invalid SQL: INSERT INTO phpgw_vfs (file_id,owner_id,createdby_id,modifiedby_id,created,modified,size,mime_type,deleteable,comment,app,directory,name,link_directory,link_name,version,content) VALUES (1,0,0,0,'1970-01-01',null,null,'Directory','Y',null,null,'/',null,null,null,'0.0.0.0',null) PostgreSQL Error: 1 (ERROR: ExecAppend: Fail to add null value in not null attribute name ) Solved doing a delete from phpgw_vfs; not really cool if you really have files on vfs. Was not my case, my vfs was empty. ...ok, upgrade seems done ok, SiteMGR is unusable. Old content are not preserved, and there's no way to insert new because of errors like these: SITEMGR: register new module Database error: Invalid SQL: INSERT INTO phpgw_sitemgr_modules (module_name,description) VALUES ('sitetree','This block displays a javascript based tree menu*') PostgreSQL Error: 1 (ERROR: Cannot insert a duplicate key into unique index phpgw_sitemgr_modules_pkey ) File: /usr/local/share/phpgroupware/sitemgr/inc/class.Modules_SO.inc.php Line: 72 Session halted. SITEMGR: commit changes Database error: Invalid SQL: SELECT COUNT(state) AS cnt,t1.block_id,area,cat_id,page_id,viewable,state FROM phpgw_sitemgr_blocks AS t1,phpgw_sitemgr_content AS t2 WHERE t1.block_id=t2.block_id AND cat_id IN (8,9,11,10,12) AND state IN (1,3) GROUP BY t1.block_id,area,cat_id,page_id,viewable PostgreSQL Error: 1 (ERROR: Attribute t2.state must be GROUPed or used in an aggregate function ) File: /usr/local/share/phpgroupware/sitemgr/inc/class.Content_SO.inc.php Line: 189 Session halted. SITEMGR: manage archived content Database error: Invalid SQL: SELECT COUNT(state) AS cnt,t1.block_id,area,cat_id,page_id,viewable,state FROM phpgw_sitemgr_blocks AS t1,phpgw_sitemgr_content AS t2 WHERE t1.block_id=t2.block_id AND cat_id IN (8,9,11,10,12) AND state IN (4) GROUP BY t1.block_id,area,cat_id,page_id,viewable PostgreSQL Error: 1 (ERROR: Attribute t2.state must be GROUPed or used in an aggregate function ) File: /usr/local/share/phpgroupware/sitemgr/inc/class.Content_SO.inc.php Line: 189 Session halted. SITEMGR: adding on contentarea left (on site-wide content) Database error: Invalid SQL: INSERT INTO phpgw_sitemgr_blocks (area,module_id,page_id,cat_id,sort_order,viewable) VALUES ('left',2,0,12,0,0) PostgreSQL Error: 1 (ERROR: Cannot insert a duplicate key into unique index phpgw_sitemgr_blocks_pkey ) File: /usr/local/share/phpgroupware/sitemgr/inc/class.Content_SO.inc.php Line: 27 Session halted. the solution? Uninstall sitemgr and reinstall it, manually restoring content from sql dump. ;((( a little more bug: SITEMGR: deleting a language Database error: Invalid SQL: DELETE FROM phpgw_sitemgr_categories_lang WHERE lang='en PostgreSQL Error: 1 (ERROR: Unterminated quoted string ) File: /usr/local/share/phpgroupware/sitemgr/inc/class.Categories_SO.inc.php Line: 190 a not-so-little bug, again on vfs: Database error: Invalid SQL: INSERT INTO phpgw_vfs (owner_id, name, directory) VALUES (1000, 'gaio', '/home') PostgreSQL Error: 1 (ERROR: ExecAppend: Fail to add null value in not null attribute created ) File: /usr/local/share/phpgroupware/phpgwapi/inc/class.vfs_sql.inc.php Line: 1803 Session halted. ops, no, this is my fault, i've to restore the default on date: alter table phpgw_vfs alter created set default '1970-01-01'; and problem gone. ;)