{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/migrations/issues/69","labels_url":"https://api.github.com/repos/cakephp/migrations/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/migrations/issues/69/comments","events_url":"https://api.github.com/repos/cakephp/migrations/issues/69/events","html_url":"https://github.com/cakephp/migrations/issues/69","id":67407455,"number":69,"title":"The datasource configuration \"default\" was not found. ","user":{"login":"mbryja","id":5615183,"avatar_url":"https://avatars.githubusercontent.com/u/5615183?v=3","gravatar_id":"","url":"https://api.github.com/users/mbryja","html_url":"https://github.com/mbryja","followers_url":"https://api.github.com/users/mbryja/followers","following_url":"https://api.github.com/users/mbryja/following{/other_user}","gists_url":"https://api.github.com/users/mbryja/gists{/gist_id}","starred_url":"https://api.github.com/users/mbryja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbryja/subscriptions","organizations_url":"https://api.github.com/users/mbryja/orgs","repos_url":"https://api.github.com/users/mbryja/repos","events_url":"https://api.github.com/users/mbryja/events{/privacy}","received_events_url":"https://api.github.com/users/mbryja/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/migrations/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"lorenzo","id":37621,"avatar_url":"https://avatars.githubusercontent.com/u/37621?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo","html_url":"https://github.com/lorenzo","followers_url":"https://api.github.com/users/lorenzo/followers","following_url":"https://api.github.com/users/lorenzo/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo/subscriptions","organizations_url":"https://api.github.com/users/lorenzo/orgs","repos_url":"https://api.github.com/users/lorenzo/repos","events_url":"https://api.github.com/users/lorenzo/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-04-09T17:11:12Z","updated_at":"2015-04-09T17:56:39Z","closed_at":"2015-04-09T17:22:51Z","body":"I'm building multisite application with cakephp 3. I won't use default connection because each of the site will connect to it's own version of database. The database structure will be identical for each site. I want to use cakephp migration to automate create and alter processes. \r\n\r\nI've created my own shell which executes 'bin/cake migrations migrate -c connection_name' command on each connection it finds. \r\n\r\nUnfortunately, I receive the following error:\r\n[Cake\\Datasource\\Exception\\MissingDatasourceConfigException]  \r\n  The datasource configuration \"default\" was not found.\r\n\r\nIt is caused by  'bootstrap' method in 'src/Configuration trait' at line 169.\r\n\r\nHere is how I've solved it: \r\n```\r\n public function bootstrap(InputInterface $input, OutputInterface $output)\r\n    {\r\n        parent::bootstrap($input, $output);\r\n\r\n        $connectionStr = 'default';\r\n        if ($this->input->getOption('connection')) {\r\n            $connectionStr = $this->input->getOption('connection');\r\n        }\r\n\r\n        $connection = $this->getManager()->getEnvironment('default')->getAdapter()->getConnection();\r\n        ConnectionManager::get($connectionStr)->driver()->connection($connection);\r\n    }\r\n```\r\nI'm not sure if this is preferable solution."},"comment":{"url":"https://api.github.com/repos/cakephp/migrations/issues/comments/91310670","html_url":"https://github.com/cakephp/migrations/issues/69#issuecomment-91310670","issue_url":"https://api.github.com/repos/cakephp/migrations/issues/69","id":91310670,"user":{"login":"lorenzo","id":37621,"avatar_url":"https://avatars.githubusercontent.com/u/37621?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo","html_url":"https://github.com/lorenzo","followers_url":"https://api.github.com/users/lorenzo/followers","following_url":"https://api.github.com/users/lorenzo/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo/subscriptions","organizations_url":"https://api.github.com/users/lorenzo/orgs","repos_url":"https://api.github.com/users/lorenzo/repos","events_url":"https://api.github.com/users/lorenzo/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T17:56:39Z","updated_at":"2015-04-09T17:56:39Z","body":"So, when you execute `bin/cake migrations migrate -c connection_name` you get the exception?"}}