{"action":"created","issue":{"url":"https://api.github.com/repos/wallabag/wallabag/issues/2364","repository_url":"https://api.github.com/repos/wallabag/wallabag","labels_url":"https://api.github.com/repos/wallabag/wallabag/issues/2364/labels{/name}","comments_url":"https://api.github.com/repos/wallabag/wallabag/issues/2364/comments","events_url":"https://api.github.com/repos/wallabag/wallabag/issues/2364/events","html_url":"https://github.com/wallabag/wallabag/issues/2364","id":181008256,"number":2364,"title":"DB migrations from 2.0.8 to 2.1.1 fail with PostgreSQL","user":{"login":"dsferruzza","id":1931963,"avatar_url":"https://avatars.githubusercontent.com/u/1931963?v=3","gravatar_id":"","url":"https://api.github.com/users/dsferruzza","html_url":"https://github.com/dsferruzza","followers_url":"https://api.github.com/users/dsferruzza/followers","following_url":"https://api.github.com/users/dsferruzza/following{/other_user}","gists_url":"https://api.github.com/users/dsferruzza/gists{/gist_id}","starred_url":"https://api.github.com/users/dsferruzza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsferruzza/subscriptions","organizations_url":"https://api.github.com/users/dsferruzza/orgs","repos_url":"https://api.github.com/users/dsferruzza/repos","events_url":"https://api.github.com/users/dsferruzza/events{/privacy}","received_events_url":"https://api.github.com/users/dsferruzza/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wallabag/wallabag/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/wallabag/wallabag/labels/Urgent","name":"Urgent","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/wallabag/wallabag/milestones/49","html_url":"https://github.com/wallabag/wallabag/milestones/2.1.2","labels_url":"https://api.github.com/repos/wallabag/wallabag/milestones/49/labels","id":2045064,"number":49,"title":"2.1.2","description":"","creator":{"login":"nicosomb","id":121870,"avatar_url":"https://avatars.githubusercontent.com/u/121870?v=3","gravatar_id":"","url":"https://api.github.com/users/nicosomb","html_url":"https://github.com/nicosomb","followers_url":"https://api.github.com/users/nicosomb/followers","following_url":"https://api.github.com/users/nicosomb/following{/other_user}","gists_url":"https://api.github.com/users/nicosomb/gists{/gist_id}","starred_url":"https://api.github.com/users/nicosomb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicosomb/subscriptions","organizations_url":"https://api.github.com/users/nicosomb/orgs","repos_url":"https://api.github.com/users/nicosomb/repos","events_url":"https://api.github.com/users/nicosomb/events{/privacy}","received_events_url":"https://api.github.com/users/nicosomb/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":35,"state":"open","created_at":"2016-10-03T19:13:54Z","updated_at":"2016-10-10T08:02:24Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-10-04T21:21:44Z","updated_at":"2016-10-10T09:44:26Z","closed_at":null,"body":"### Issue details\r\n\r\nHi!\r\n\r\nI have a working instance of Wallabag 2.0.8 on my dedicated server, plugged to a PostgreSQL 9.6 database.\r\nWhen following [the procedure](http://doc.wallabag.org/en/master/user/upgrade-2.0.x-2.1.y.html#upgrade-on-a-dedicated-web-server) to upgrade to Wallabag 2.1.1, the migrations fail:\r\n\r\n```\r\n % php bin/console doctrine:migrations:migrate --env=prod\r\n\r\n                    Application Migrations\r\n\r\n\r\nWARNING! You are about to execute a database migration that could result in schema changes and data lost. Are you sure you wish to continue? (y/n)y\r\nMigrating up to 20160916201049 from 0\r\n\r\n  ++ migrating 20160410190541\r\n\r\n     -> ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL\r\nMigration 20160410190541 failed during Execution. Error An exception occurred while executing 'ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL':\r\n\r\nSQLSTATE[42601]: Syntax error: 7 ERREUR:  erreur de syntaxe sur ou près de « ` »\r\nLINE 1: ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NUL...\r\n                    ^\r\n\r\n\r\n  [Doctrine\\DBAL\\Exception\\SyntaxErrorException]\r\n  An exception occurred while executing 'ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL':\r\n  SQLSTATE[42601]: Syntax error: 7 ERREUR:  erreur de syntaxe sur ou près de « ` »\r\n  LINE 1: ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NUL...\r\n                      ^\r\n\r\n\r\n\r\n  [Doctrine\\DBAL\\Driver\\PDOException]\r\n  SQLSTATE[42601]: Syntax error: 7 ERREUR:  erreur de syntaxe sur ou près de « ` »\r\n  LINE 1: ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NUL...\r\n                      ^\r\n\r\n\r\n\r\n  [PDOException]\r\n  SQLSTATE[42601]: Syntax error: 7 ERREUR:  erreur de syntaxe sur ou près de « ` »\r\n  LINE 1: ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NUL...\r\n                      ^\r\n\r\n\r\ndoctrine:migrations:migrate [--write-sql] [--dry-run] [--query-time] [--allow-no-migration] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<version>]\r\n```\r\n\r\nThis query seems to have been written with MySQL in mind, because PostgreSQL doesn't use backticks for columns names (but double quotes), nor `LONGTEXT` type ([see the `test` type](https://www.postgresql.org/docs/9.6/static/datatype-character.html)).\r\n\r\nAlso the `Migrating up to 20160916201049 from 0` is a bit surprising: there is a schema but it was created without migrations?\r\n\r\nDid you try it on PostgreSQL or am I doing something wrong?\r\n\r\n### Environment\r\n\r\n* wallabag version (or git revision) that exhibits the issue: 2.1.1\r\n* How did you install wallabag? Via `git clone` or by downloading the package? `git clone`\r\n* Last wallabag version that did not exhibit the issue (if applicable): 2.0.8\r\n* php version: PHP 5.6.24-0+deb8u1\r\n* OS: Debian 8.6\r\n* type of hosting (shared or dedicated): dedicated\r\n* which storage system you choose at install (SQLite, MySQL/MariaDB or PostgreSQL): PostgreSQL\r\n\r\n### Steps to reproduce/test case\r\n\r\n- install Wallabag 2.0.8 with PostgreSQL\r\n- follow [the procedure](http://doc.wallabag.org/en/master/user/upgrade-2.0.x-2.1.y.html#upgrade-on-a-dedicated-web-server) to upgrade to Wallabag 2.1.1\r\n"},"comment":{"url":"https://api.github.com/repos/wallabag/wallabag/issues/comments/252574165","html_url":"https://github.com/wallabag/wallabag/issues/2364#issuecomment-252574165","issue_url":"https://api.github.com/repos/wallabag/wallabag/issues/2364","id":252574165,"user":{"login":"nicosomb","id":121870,"avatar_url":"https://avatars.githubusercontent.com/u/121870?v=3","gravatar_id":"","url":"https://api.github.com/users/nicosomb","html_url":"https://github.com/nicosomb","followers_url":"https://api.github.com/users/nicosomb/followers","following_url":"https://api.github.com/users/nicosomb/following{/other_user}","gists_url":"https://api.github.com/users/nicosomb/gists{/gist_id}","starred_url":"https://api.github.com/users/nicosomb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicosomb/subscriptions","organizations_url":"https://api.github.com/users/nicosomb/orgs","repos_url":"https://api.github.com/users/nicosomb/repos","events_url":"https://api.github.com/users/nicosomb/events{/privacy}","received_events_url":"https://api.github.com/users/nicosomb/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T09:44:25Z","updated_at":"2016-10-10T09:44:25Z","body":"@Dual-Boot @Ygster @rabyte @beedaddy @dsferruzza Hi! We have a fix, made by @j0k3r: https://github.com/wallabag/wallabag/pull/2412 Can you try this branch and give us feedback please? "}}
{"actor":{"display_login":"nicosomb"}}