Post A91Mf1AfMavaN2qdgO by valvin@friendica.valvin.fr
 (DIR) More posts by valvin@friendica.valvin.fr
 (DIR) Post #A90p9zHV2hwr2rdkkC by valvin@friendica.valvin.fr
       2021-07-06T12:38:23Z
       
       0 likes, 0 repeats
       
       @helpers I'm upgrading feneas friendica instance from 2021.01 to 2021.04 (and then 2021.07).I had issue while upgrading and now I have this error but don't know what I can do:bin/console dbstructure update Warning: session_write_close(): Failed to write session data using user defined save handler. (session.save_path: ) in Unknown on line 0It looks I can't start any new session? By the way instance is running but I'm having the dbstructure error in admin panel.
       
 (DIR) Post #A90pA2L9fZeeX4NDMG by heluecht@pirati.ca
       2021-07-06T12:44:38Z
       
       0 likes, 0 repeats
       
       Just ignore this "session" message. You are calling this from the command line aren't you? Is the command still running? If yes, then please don't interrupt the system. This specific update (1 to 4) can take a lot of time (expect hours)
       
 (DIR) Post #A90sgMhrmcfypJ6U1g by valvin@friendica.valvin.fr
       2021-07-06T13:18:16Z
       
       0 likes, 0 repeats
       
       Not sure it is doing things in background:2021-07-06T13:16:38Z console [ERROR]: DB Error {"code":1451,"error":"Cannot delete or update a parent row: a foreign key constraint fails","callstack":"DBA::e, pre_update_1395, Update::runUpdateFunction, Update::run, DatabaseStructure::doExecute, Console::execute, Console::doExecute, Console::execute","params":"DROP TABLE `post-user`"} - {"file":"Database.php","line":765,"function":"e","uid":"0ecec0","process_id":2772}2021-07-06T13:16:38Z console [ERROR]: Update function ERROR. {"function":"pre_update_1395","retval":1} - {"file":"Update.php","line":262,"function":"runUpdateFunction","uid":"0ecec0","process_id":2772}2021-07-06T13:16:38Z console [WARNING]: Pre update failed {"version":1395} - {"file":"Update.php","line":156,"function":"run","uid":"0ecec0","process_id":2772}
       
 (DIR) Post #A90sgQJCOHJxzxaq8G by heluecht@pirati.ca
       2021-07-06T13:24:13Z
       
       0 likes, 0 repeats
       
       Please execute the command show create table `post-user`; and tell the result here.
       
 (DIR) Post #A90udsXl9pA8bgJnFo by heluecht@pirati.ca
       2021-07-06T13:46:06Z
       
       0 likes, 0 repeats
       
       BTW: If you need direct support, please contact me, so that we both can have a direct look.
       
 (DIR) Post #A91Mf1AfMavaN2qdgO by valvin@friendica.valvin.fr
       2021-07-06T18:47:33Z
       
       0 likes, 0 repeats
       
       @heluecht here is the result of the command| post-user | CREATE TABLE `post-user` (  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,  `uri-id` int(10) unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri',  `parent-uri-id` int(10) unsigned DEFAULT NULL COMMENT 'Id of the item-uri table that contains the parent uri',  `thr-parent-id` int(10) unsigned DEFAULT NULL COMMENT 'Id of the item-uri table that contains the thread parent uri',  `external-id` int(10) unsigned DEFAULT NULL COMMENT 'Id of the item-uri table entry that contains the external uri',  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Creation timestamp.',  `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of last edit (default is created)',  `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime',  `gravity` tinyint(3) unsigned NOT NULL DEFAULT 0,  `network` char(4) NOT NULL DEFAULT '' COMMENT 'Network from where the item comes from',  `owner-id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the owner of this item',  `author-id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the author of this item',  `causer-id` int(10) unsigned DEFAULT NULL COMMENT 'Link to the contact table with uid=0 of the contact that caused the item creation',  `post-type` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT 'Post type (personal note, image, article, ...)',  `post-reason` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT 'Reason why the post arrived at the user',  `vid` smallint(5) unsigned DEFAULT NULL COMMENT 'Id of the verb table entry that contains the activity verbs',  `private` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT '0=public, 1=private, 2=unlisted',  `global` tinyint(1) NOT NULL DEFAULT 0,  `visible` tinyint(1) NOT NULL DEFAULT 0,  `deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'item has been marked for deletion',  `uid` mediumint(8) unsigned NOT NULL COMMENT 'Owner id which owns this copy of the item',  `protocol` tinyint(3) unsigned DEFAULT NULL COMMENT 'Protocol used to deliver the item for this user',  `contact-id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'contact.id',  `event-id` int(10) unsigned DEFAULT NULL COMMENT 'Used to link to the event.id',  `unseen` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'post has not been seen',  `hidden` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Marker to hide the post from the user',  `notification-type` tinyint(3) unsigned NOT NULL DEFAULT 0,  `wall` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'This item was posted to the wall of uid',  `origin` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'item originated at this site',  `psid` int(10) unsigned DEFAULT NULL COMMENT 'ID of the permission set of this post',  PRIMARY KEY (`id`),  UNIQUE KEY `uid_uri-id` (`uid`,`uri-id`),  KEY `uri-id` (`uri-id`),  KEY `parent-uri-id` (`parent-uri-id`),  KEY `thr-parent-id` (`thr-parent-id`),  KEY `external-id` (`external-id`),  KEY `owner-id` (`owner-id`),  KEY `author-id` (`author-id`),  KEY `causer-id` (`causer-id`),  KEY `vid` (`vid`),  KEY `contact-id` (`contact-id`),  KEY `event-id` (`event-id`),  KEY `psid` (`psid`),  KEY `author-id_uid` (`author-id`,`uid`),  KEY `author-id_received` (`author-id`,`received`),  KEY `parent-uri-id_uid` (`parent-uri-id`,`uid`),  KEY `uid_contactid` (`uid`,`contact-id`),  KEY `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`),  KEY `uid_unseen` (`uid`,`unseen`),  KEY `uid_hidden_uri-id` (`uid`,`hidden`,`uri-id`),  CONSTRAINT `post-user_ibfk_1` FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON DELETE CASCADE,  CONSTRAINT `post-user_ibfk_10` FOREIGN KEY (`contact-id`) REFERENCES `contact` (`id`) ON DELETE CASCADE,  CONSTRAINT `post-user_ibfk_11` FOREIGN KEY (`event-id`) REFERENCES `event` (`id`) ON DELETE CASCADE,  CONSTRAINT `post-user_ibfk_12` FOREIGN KEY (`psid`) REFERENCES `permissionset` (`id`),  CONSTRAINT `post-user_ibfk_2` FOREIGN KEY (`parent-uri-id`) REFERENCES `item-uri` (`id`) ON DELETE CASCADE,  CONSTRAINT `post-user_ibfk_3` FOREIGN KEY (`thr-parent-id`) REFERENCES `item-uri` (`id`) ON DELETE CASCADE,  CONSTRAINT `post-user_ibfk_4` FOREIGN KEY (`external-id`) REFERENCES `item-uri` (`id`) ON DELETE CASCADE,  CONSTRAINT `post-user_ibfk_5` FOREIGN KEY (`owner-id`) REFERENCES `contact` (`id`),  CONSTRAINT `post-user_ibfk_6` FOREIGN KEY (`author-id`) REFERENCES `contact` (`id`),  CONSTRAINT `post-user_ibfk_7` FOREIGN KEY (`causer-id`) REFERENCES `contact` (`id`),  CONSTRAINT `post-user_ibfk_8` FOREIGN KEY (`vid`) REFERENCES `verb` (`id`),  CONSTRAINT `post-user_ibfk_9` FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE) ENGINE=InnoDB AUTO_INCREMENT=5624292 DEFAULT CHARSET=utf8mb4 COMMENT='User specific post data' |
       
 (DIR) Post #A91Mf4oTp1YdfOUyem by heluecht@pirati.ca
       2021-07-06T18:59:51Z
       
       0 likes, 0 repeats
       
       Okay. That's what I expected and what had been corrected in the following version: https://github.com/friendica/friendica/blob/develop/update.php#L666-L672You could apply the changes manually or you could comment out that function completely. Both would work.