{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/4027","labels_url":"https://api.github.com/repos/owncloud/core/issues/4027/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/4027/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/4027/events","html_url":"https://github.com/owncloud/core/pull/4027","id":16629691,"number":4027,"title":"[WIP] Why do the db tests explode when I force a schema update","user":{"login":"butonic","id":956847,"avatar_url":"https://avatars.githubusercontent.com/u/956847?v=3","gravatar_id":"","url":"https://api.github.com/users/butonic","html_url":"https://github.com/butonic","followers_url":"https://api.github.com/users/butonic/followers","following_url":"https://api.github.com/users/butonic/following{/other_user}","gists_url":"https://api.github.com/users/butonic/gists{/gist_id}","starred_url":"https://api.github.com/users/butonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/butonic/subscriptions","organizations_url":"https://api.github.com/users/butonic/orgs","repos_url":"https://api.github.com/users/butonic/repos","events_url":"https://api.github.com/users/butonic/events{/privacy}","received_events_url":"https://api.github.com/users/butonic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/4%20-%20Developing","name":"4 - Developing","color":"ededed"},{"url":"https://api.github.com/repos/owncloud/core/labels/research","name":"research","color":"FFFF00"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2013-07-11T13:07:39Z","updated_at":"2015-03-20T11:02:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/4027","html_url":"https://github.com/owncloud/core/pull/4027","diff_url":"https://github.com/owncloud/core/pull/4027.diff","patch_url":"https://github.com/owncloud/core/pull/4027.patch"},"body":"# :construction: DO NOT MERGE THIS YET! :construction: \r\n\r\nUpdating the schema with the current one should not change anything, yet it fails badly and even breaks subsequent tests.\r\n\r\nI only added a test method that will force a schema update. That causes MDB2 to fetch the schema from the DB, compare it to the one in `db_structure.xml` and execute any necessary updates. This mechanism seems more fragile than we think.\r\n\r\n@bartv2 could you test this with doctrine?\r\n\r\n@icewind1991 the filecache tests seem to insert rows missing `storage_mtime` and `unencrypted_size` which are defined as\r\n```xml\r\n\r\n\t\t\t<field>\r\n\t\t\t\t<name>storage_mtime</name>\r\n\t\t\t\t<type>integer</type>\r\n\t\t\t\t<default></default>\r\n\t\t\t\t<notnull>true</notnull>\r\n\t\t\t\t<length>4</length>\r\n\t\t\t</field>\r\n\r\n            <field>\r\n                <name>unencrypted_size</name>\r\n                <type>integer</type>\r\n                <default></default>\r\n                <notnull>true</notnull>\r\n                <length>8</length>\r\n            </field>\r\n```\r\n\r\nI don't know why that only shows up after forcing a db schema update. In any case these definitions will not work on oracle because it treats '' as null. using `<default></default>` in combination with `<notnull>true</notnull>` is simply wrong."},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/83986396","html_url":"https://github.com/owncloud/core/pull/4027#issuecomment-83986396","issue_url":"https://api.github.com/repos/owncloud/core/issues/4027","id":83986396,"user":{"login":"scrutinizer-notifier","id":6398257,"avatar_url":"https://avatars.githubusercontent.com/u/6398257?v=3","gravatar_id":"","url":"https://api.github.com/users/scrutinizer-notifier","html_url":"https://github.com/scrutinizer-notifier","followers_url":"https://api.github.com/users/scrutinizer-notifier/followers","following_url":"https://api.github.com/users/scrutinizer-notifier/following{/other_user}","gists_url":"https://api.github.com/users/scrutinizer-notifier/gists{/gist_id}","starred_url":"https://api.github.com/users/scrutinizer-notifier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrutinizer-notifier/subscriptions","organizations_url":"https://api.github.com/users/scrutinizer-notifier/orgs","repos_url":"https://api.github.com/users/scrutinizer-notifier/repos","events_url":"https://api.github.com/users/scrutinizer-notifier/events{/privacy}","received_events_url":"https://api.github.com/users/scrutinizer-notifier/received_events","type":"User","site_admin":false},"created_at":"2015-03-20T11:02:46Z","updated_at":"2015-03-20T11:02:46Z","body":"The [inspection](https://scrutinizer-ci.com/g/owncloud/core/inspections/c4b1d780-37fc-455d-81c1-10081341bbd0) completed: **1 updated code elements**"}}