{"action":"opened","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/5937","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/5937/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/5937/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/5937/events","html_url":"https://github.com/cakephp/cakephp/issues/5937","id":58460714,"number":5937,"title":"Update fixtures schema or schema.lock file","user":{"login":"Laykou","id":2313005,"avatar_url":"https://avatars.githubusercontent.com/u/2313005?v=3","gravatar_id":"","url":"https://api.github.com/users/Laykou","html_url":"https://github.com/Laykou","followers_url":"https://api.github.com/users/Laykou/followers","following_url":"https://api.github.com/users/Laykou/following{/other_user}","gists_url":"https://api.github.com/users/Laykou/gists{/gist_id}","starred_url":"https://api.github.com/users/Laykou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Laykou/subscriptions","organizations_url":"https://api.github.com/users/Laykou/orgs","repos_url":"https://api.github.com/users/Laykou/repos","events_url":"https://api.github.com/users/Laykou/events{/privacy}","received_events_url":"https://api.github.com/users/Laykou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-21T14:16:42Z","updated_at":"2015-02-21T14:16:42Z","closed_at":null,"body":"It would be helpful to automatically update fixtures `$fields` after the migration. The fixtures cannot be $imported when running on the third-party testing tool like codeship, travis, appveyor...\r\n\r\nIn Rails there is a `schema.rb` file which holds the current db schema and is loaded before testing. The best solution would be to have some `schema.lock` file which could be loaded running the command `cake tests prepare` or something like that, so that user can schedule when to dump the schema.\r\n\r\nThe `schema.lock` file would be automatically recreated whenever running `cake migrations migrate`.\r\n\r\nI would use this feature with the [cake/codeception](http://github.com/cakephp/codeception) acceptance tests so it could be somehow connected so that the schema is automatically loaded before the acceptance tests.\r\n\r\nMaintaining the fixtures and migrations isn't the best way for clean code :)"}}