{"action":"opened","issue":{"url":"https://api.github.com/repos/gitbucket/gitbucket/issues/1227","repository_url":"https://api.github.com/repos/gitbucket/gitbucket","labels_url":"https://api.github.com/repos/gitbucket/gitbucket/issues/1227/labels{/name}","comments_url":"https://api.github.com/repos/gitbucket/gitbucket/issues/1227/comments","events_url":"https://api.github.com/repos/gitbucket/gitbucket/issues/1227/events","html_url":"https://github.com/gitbucket/gitbucket/issues/1227","id":163505796,"number":1227,"title":"4.2: Database migration seems to fail for non-empty database - Column \"X21.ALLOW_WIKI_EDITING\" not found","user":{"login":"uli-heller","id":1677414,"avatar_url":"https://avatars.githubusercontent.com/u/1677414?v=3","gravatar_id":"","url":"https://api.github.com/users/uli-heller","html_url":"https://github.com/uli-heller","followers_url":"https://api.github.com/users/uli-heller/followers","following_url":"https://api.github.com/users/uli-heller/following{/other_user}","gists_url":"https://api.github.com/users/uli-heller/gists{/gist_id}","starred_url":"https://api.github.com/users/uli-heller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uli-heller/subscriptions","organizations_url":"https://api.github.com/users/uli-heller/orgs","repos_url":"https://api.github.com/users/uli-heller/repos","events_url":"https://api.github.com/users/uli-heller/events{/privacy}","received_events_url":"https://api.github.com/users/uli-heller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-02T07:00:19Z","updated_at":"2016-07-02T07:00:19Z","closed_at":null,"body":"I've upgraded from 4.1 to 4.2 and now I'm getting this error:\r\n\r\n```\r\norg.h2.jdbc.JdbcSQLException: Column \"X21.ALLOW_WIKI_EDITING\" not found; SQL statement:\r\nCREATE FORCE VIEW PUBLIC._1 AS\r\nSELECT\r\n    X21.UPDATED_DATE AS X22,\r\n    X21.ALLOW_WIKI_EDITING AS X23,\r\n    X21.EXTERNAL_ISSUES_URL AS X24,\r\n    X21.PARENT_REPOSITORY_NAME AS X25,\r\n    X21.EXTERNAL_WIKI_URL AS X26,\r\n    X21.DEFAULT_BRANCH AS X27,\r\n    X21.DESCRIPTION AS X28,\r\n    X21.ORIGIN_REPOSITORY_NAME AS X29,\r\n    X21.ORIGIN_USER_NAME AS X30,\r\n    X21.PARENT_USER_NAME AS X31,\r\n    X21.PRIVATE AS X32,\r\n    X21.REPOSITORY_NAME AS X33,\r\n    X21.USER_NAME AS X34,\r\n    X21.ENABLE_WIKI AS X35,\r\n    X21.ENABLE_ISSUES AS X36,\r\n    X21.REGISTERED_DATE AS X37,\r\n    X21.LAST_ACTIVITY_DATE AS X38\r\nFROM PUBLIC.REPOSITORY X21 [42122-192]\r\n\tat org.h2.message.DbException.getJdbcSQLException(DbException.java:345)\r\n\tat org.h2.message.DbException.get(DbException.java:179)\r\n\tat org.h2.message.DbException.get(DbException.java:155)\r\n\tat org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:147)\r\n\tat org.h2.expression.Alias.optimize(Alias.java:51)\r\n\tat org.h2.command.dml.Select.prepare(Select.java:852)\r\n...\r\n```\r\n\r\nI've double-checked  using empty databases, i.e.:\r\n\r\n```\r\nrm -rf ~/.gitbucket\r\ngit checkout 4.1\r\n./sbt.sh package\r\n./sbt.sh executable\r\njava -jar target/executable/gitbucket.war\r\n./sbt.sh clean; rm -rf target; git clean -f\r\ngit checkout 4.2\r\n./sbt.sh package\r\n./sbt.sh executable\r\n java -jar target/executable/gitbucket.war\r\n```\r\n\r\nFor these, it works without an issue. So the migration seems to fail only when the database actually contains data."}}
{"actor":{"display_login":"uli-heller"}}