{"action":"created","issue":{"url":"https://api.github.com/repos/fguillot/kanboard/issues/952","labels_url":"https://api.github.com/repos/fguillot/kanboard/issues/952/labels{/name}","comments_url":"https://api.github.com/repos/fguillot/kanboard/issues/952/comments","events_url":"https://api.github.com/repos/fguillot/kanboard/issues/952/events","html_url":"https://github.com/fguillot/kanboard/issues/952","id":91276854,"number":952,"title":"master-branch: Unable to migrate database schema","user":{"login":"kingfisher77","id":3303980,"avatar_url":"https://avatars.githubusercontent.com/u/3303980?v=3","gravatar_id":"","url":"https://api.github.com/users/kingfisher77","html_url":"https://github.com/kingfisher77","followers_url":"https://api.github.com/users/kingfisher77/followers","following_url":"https://api.github.com/users/kingfisher77/following{/other_user}","gists_url":"https://api.github.com/users/kingfisher77/gists{/gist_id}","starred_url":"https://api.github.com/users/kingfisher77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kingfisher77/subscriptions","organizations_url":"https://api.github.com/users/kingfisher77/orgs","repos_url":"https://api.github.com/users/kingfisher77/repos","events_url":"https://api.github.com/users/kingfisher77/events{/privacy}","received_events_url":"https://api.github.com/users/kingfisher77/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fguillot/kanboard/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-26T15:17:55Z","updated_at":"2015-06-27T21:03:42Z","closed_at":null,"body":"Hi,\r\njust tried to git pull current changes in master branch with this result:\r\n\r\nUnable to migrate database schema: \r\n\\Schema\\version_75 => SQLSTATE[HY000]: General error: 1025 Error on rename of './kanboard2/comments' to './kanboard2/#sql2-3f2-12cfd5' (errno: 152)\r\n\r\nFound a few issues about that from the past - without a glue how to fix it.\r\n\r\nAny hint?\r\n\r\n$ mysql -V\r\nmysql  Ver 14.14 Distrib 5.5.43, for debian-linux-gnu (x86_64) using readline 6.3\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/fguillot/kanboard/issues/comments/116143782","html_url":"https://github.com/fguillot/kanboard/issues/952#issuecomment-116143782","issue_url":"https://api.github.com/repos/fguillot/kanboard/issues/952","id":116143782,"user":{"login":"kingfisher77","id":3303980,"avatar_url":"https://avatars.githubusercontent.com/u/3303980?v=3","gravatar_id":"","url":"https://api.github.com/users/kingfisher77","html_url":"https://github.com/kingfisher77","followers_url":"https://api.github.com/users/kingfisher77/followers","following_url":"https://api.github.com/users/kingfisher77/following{/other_user}","gists_url":"https://api.github.com/users/kingfisher77/gists{/gist_id}","starred_url":"https://api.github.com/users/kingfisher77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kingfisher77/subscriptions","organizations_url":"https://api.github.com/users/kingfisher77/orgs","repos_url":"https://api.github.com/users/kingfisher77/repos","events_url":"https://api.github.com/users/kingfisher77/events{/privacy}","received_events_url":"https://api.github.com/users/kingfisher77/received_events","type":"User","site_admin":false},"created_at":"2015-06-27T21:03:42Z","updated_at":"2015-06-27T21:03:42Z","body":"Yes, meanwhile i added the constraints manually and it works now... Strange, didn't touch the database ...  \n\nOn 27 Jun 2015, at 22:44, Frédéric Guillot wrote:\n\n> I don't understand why but constraints are missing in your table.\n>\n> You can probably fix the issue manually, by removing the first line of the migration 75 (app/Schema/Mysql.php) see https://github.com/fguillot/kanboard/blob/master/app/Schema/Mysql.php#L23\n>\n> After the schema migration your table should be similar to that:\n>\n> ```sql\n> mysql> show create table comments\\G\n> *************************** 1. row ***************************\n>     Table: comments\n> Create Table: CREATE TABLE `comments` (\n> `id` int(11) NOT NULL AUTO_INCREMENT,\n> `task_id` int(11) NOT NULL,\n> `user_id` int(11) DEFAULT '0',\n> `date_creation` int(11) NOT NULL,\n> `comment` text,\n> `reference` varchar(50) DEFAULT '',\n> PRIMARY KEY (`id`),\n> KEY `user_id` (`user_id`),\n> KEY `comments_reference_idx` (`reference`),\n> KEY `comments_task_idx` (`task_id`),\n> CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE\n> ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8\n> 1 row in set (0.00 sec)\n> ```\n>\n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/fguillot/kanboard/issues/952#issuecomment-116138708\n\n-- \nTobias Kirchhofer\ntobias@kirchhofer.net\n\n"}}