{"action":"created","issue":{"url":"https://api.github.com/repos/chamilo/chamilo-lms/issues/1476","repository_url":"https://api.github.com/repos/chamilo/chamilo-lms","labels_url":"https://api.github.com/repos/chamilo/chamilo-lms/issues/1476/labels{/name}","comments_url":"https://api.github.com/repos/chamilo/chamilo-lms/issues/1476/comments","events_url":"https://api.github.com/repos/chamilo/chamilo-lms/issues/1476/events","html_url":"https://github.com/chamilo/chamilo-lms/issues/1476","id":184947099,"number":1476,"title":"Error while upgrading from 1.9.10.2 to 1.11.0. Fixed by migration to 1.11.2","user":{"login":"simbulu","id":15618394,"avatar_url":"https://avatars.githubusercontent.com/u/15618394?v=3","gravatar_id":"","url":"https://api.github.com/users/simbulu","html_url":"https://github.com/simbulu","followers_url":"https://api.github.com/users/simbulu/followers","following_url":"https://api.github.com/users/simbulu/following{/other_user}","gists_url":"https://api.github.com/users/simbulu/gists{/gist_id}","starred_url":"https://api.github.com/users/simbulu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simbulu/subscriptions","organizations_url":"https://api.github.com/users/simbulu/orgs","repos_url":"https://api.github.com/users/simbulu/repos","events_url":"https://api.github.com/users/simbulu/events{/privacy}","received_events_url":"https://api.github.com/users/simbulu/received_events","type":"User","site_admin":false},"labels":[{"id":441213964,"url":"https://api.github.com/repos/chamilo/chamilo-lms/labels/More%20info%20required","name":"More info required","color":"ff8a04","default":false}],"state":"open","locked":false,"assignee":{"login":"jmontoyaa","id":158935,"avatar_url":"https://avatars.githubusercontent.com/u/158935?v=3","gravatar_id":"","url":"https://api.github.com/users/jmontoyaa","html_url":"https://github.com/jmontoyaa","followers_url":"https://api.github.com/users/jmontoyaa/followers","following_url":"https://api.github.com/users/jmontoyaa/following{/other_user}","gists_url":"https://api.github.com/users/jmontoyaa/gists{/gist_id}","starred_url":"https://api.github.com/users/jmontoyaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmontoyaa/subscriptions","organizations_url":"https://api.github.com/users/jmontoyaa/orgs","repos_url":"https://api.github.com/users/jmontoyaa/repos","events_url":"https://api.github.com/users/jmontoyaa/events{/privacy}","received_events_url":"https://api.github.com/users/jmontoyaa/received_events","type":"User","site_admin":false},"assignees":[{"login":"jmontoyaa","id":158935,"avatar_url":"https://avatars.githubusercontent.com/u/158935?v=3","gravatar_id":"","url":"https://api.github.com/users/jmontoyaa","html_url":"https://github.com/jmontoyaa","followers_url":"https://api.github.com/users/jmontoyaa/followers","following_url":"https://api.github.com/users/jmontoyaa/following{/other_user}","gists_url":"https://api.github.com/users/jmontoyaa/gists{/gist_id}","starred_url":"https://api.github.com/users/jmontoyaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmontoyaa/subscriptions","organizations_url":"https://api.github.com/users/jmontoyaa/orgs","repos_url":"https://api.github.com/users/jmontoyaa/repos","events_url":"https://api.github.com/users/jmontoyaa/events{/privacy}","received_events_url":"https://api.github.com/users/jmontoyaa/received_events","type":"User","site_admin":false}],"milestone":null,"comments":22,"created_at":"2016-10-24T20:33:21Z","updated_at":"2016-11-03T00:12:32Z","closed_at":null,"body":"I tried to upgrade our installation from 1.9.10.2 to 1.10.2. This failed with errors and other issues.\n\nAfter restoration of 1.9.10.2, database included, we tried to upgrade directly from 1.9.10.2 to 1.11.0,\nby unpacking 1.11 over 1.9.10.2 and running the web based installer, selecting 'Upgrade'.\n\nThis failed as well with the fatal error message below, indicating a missing column in the db.\n\nAny ideas on what we can be do now would be very much appreciated.\n\n`\n    VERSION: 20160808110200\n    ----------------------------------------------\n    UPDATE c_forum_post SET post_parent_id = NULL WHERE post_parent_id = 0\n\n```\nDONE!\n\nFatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054\n  Unknown column 'session_id' in 'where clause''\n  in /var/www/chamilo-lms-1.9.10.2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104\nStack trace:\n#0 /var/www/chamilo-lms-1.9.10.2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(104): PDO->query('UPDATE c_item_p...')\n#1 /var/www/chamilo-lms-1.9.10.2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(833): Doctrine\\DBAL\\Driver\\PDOConnection->query('UPDATE c_item_p...')\n#2 /var/www/chamilo-lms-1.9.10.2/main/install/install.lib.php(2192): Doctrine\\DBAL\\Connection->executeQuery('UPDATE c_item_p...')\n#3 /var/www/chamilo-lms-1.9.10.2/main/install/install.lib.php(2962): fixIds(Object(Doctrine\\ORM\\EntityManager))\n#4 /var/www/chamilo-lms-1.9.10.2/main/install/index.php(756): migrateSwitch('1.9.10', Object(Doctrine\\ORM\\EntityManager))\n#5 {main}\n\nNext exception 'Doctrine\\DBAL\\Driver\\PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054\n  Un in /var/www/chamilo-lms-1.9.10.2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 71\n```\n\n`\n\nSystem info:   chamilo-lms-1.9.10.2 php-5.4.16 mariadb-5.5.50 httpd-2.4.6 centos-release-7 Linux 3.10.0-327.36.1.el7.x86_64\n\nUrl when failing: \n  http://localhost/main/install/index.php?running=1&installType=update&updateFromConfigFile=main%2Finc%2Fconf%2Fconfiguration.php\n"},"comment":{"url":"https://api.github.com/repos/chamilo/chamilo-lms/issues/comments/258037363","html_url":"https://github.com/chamilo/chamilo-lms/issues/1476#issuecomment-258037363","issue_url":"https://api.github.com/repos/chamilo/chamilo-lms/issues/1476","id":258037363,"user":{"login":"ywarnier","id":609839,"avatar_url":"https://avatars.githubusercontent.com/u/609839?v=3","gravatar_id":"","url":"https://api.github.com/users/ywarnier","html_url":"https://github.com/ywarnier","followers_url":"https://api.github.com/users/ywarnier/followers","following_url":"https://api.github.com/users/ywarnier/following{/other_user}","gists_url":"https://api.github.com/users/ywarnier/gists{/gist_id}","starred_url":"https://api.github.com/users/ywarnier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywarnier/subscriptions","organizations_url":"https://api.github.com/users/ywarnier/orgs","repos_url":"https://api.github.com/users/ywarnier/repos","events_url":"https://api.github.com/users/ywarnier/events{/privacy}","received_events_url":"https://api.github.com/users/ywarnier/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T00:12:32Z","updated_at":"2016-11-03T00:12:32Z","body":"To give you an idea of the source of the issue (then I'll have our team review the differences), the `php bin/doctrine.php orm:schema-tool:update` is based on a calculation of the differences between the definition of the entities (src/Chamilo/[...]/Entity/[...]) and the current database schema.\r\nThe migration (which can also be triggered with `php bin/doctrine.php migrations:migrate` with various options) are strictly following the files definitions in app/Migrations/Schema/.\r\n\r\nNow logic would have it that these 2 should generate exactly the same result, but there has been some level of error there *and* some Entity definitions come with a \"default\" in template files that say that strings (varchar) should be 100 chars in length, while the default in Chamilo until then was 255. So I *think* (but honestly I would like to be sure) @jmontoyaa must have intially configured it as 100 in a hurry to test the entities (the User entity was one of the first migrated to the entities model) and then forgot about the length of the fields, while Chamilo used to have them as varchar(255) and the migrations did not change that (because they shouldn't).\r\nThe \"locked\" field is a mistery to me (I know what it's for but I don't see why it could not be null).\r\n\r\nSo... back to @jmontoyaa "}}
{"actor":{"display_login":"ywarnier"}}