{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails/issues/3109","labels_url":"https://api.github.com/repos/balderdashy/sails/issues/3109/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/3109/comments","events_url":"https://api.github.com/repos/balderdashy/sails/issues/3109/events","html_url":"https://github.com/balderdashy/sails/issues/3109","id":97235149,"number":3109,"title":"Manually fetch tables from Mysql","user":{"login":"ytzvan","id":703873,"avatar_url":"https://avatars.githubusercontent.com/u/703873?v=3","gravatar_id":"","url":"https://api.github.com/users/ytzvan","html_url":"https://github.com/ytzvan","followers_url":"https://api.github.com/users/ytzvan/followers","following_url":"https://api.github.com/users/ytzvan/following{/other_user}","gists_url":"https://api.github.com/users/ytzvan/gists{/gist_id}","starred_url":"https://api.github.com/users/ytzvan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytzvan/subscriptions","organizations_url":"https://api.github.com/users/ytzvan/orgs","repos_url":"https://api.github.com/users/ytzvan/repos","events_url":"https://api.github.com/users/ytzvan/events{/privacy}","received_events_url":"https://api.github.com/users/ytzvan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-25T16:01:06Z","updated_at":"2015-07-27T19:33:59Z","closed_at":null,"body":"I want to access to existing Mysqldb, I sucesfully connect to them, but when I try to access using Model.find(), there's no data. I think this is happening because I set migration : safe, but If I set to migration:alter, at the start up send me an error because Sails-mysql try to \"Drop\", but I have no rights. How can I migrate the data manually or access direct to the data? "},"comment":{"url":"https://api.github.com/repos/balderdashy/sails/issues/comments/125319858","html_url":"https://github.com/balderdashy/sails/issues/3109#issuecomment-125319858","issue_url":"https://api.github.com/repos/balderdashy/sails/issues/3109","id":125319858,"user":{"login":"ytzvan","id":703873,"avatar_url":"https://avatars.githubusercontent.com/u/703873?v=3","gravatar_id":"","url":"https://api.github.com/users/ytzvan","html_url":"https://github.com/ytzvan","followers_url":"https://api.github.com/users/ytzvan/followers","following_url":"https://api.github.com/users/ytzvan/following{/other_user}","gists_url":"https://api.github.com/users/ytzvan/gists{/gist_id}","starred_url":"https://api.github.com/users/ytzvan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytzvan/subscriptions","organizations_url":"https://api.github.com/users/ytzvan/orgs","repos_url":"https://api.github.com/users/ytzvan/repos","events_url":"https://api.github.com/users/ytzvan/events{/privacy}","received_events_url":"https://api.github.com/users/ytzvan/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T19:33:59Z","updated_at":"2015-07-27T19:33:59Z","body":"Hello, I was using the Model.find() options with migrate:safe setting. I\nchanged Model.find() for Model.query() and make a native SQL statement.\nThanks for all your help.\n\n2015-07-27 10:02 GMT-05:00 Rich Dunajewski <notifications@github.com>:\n\n> Does your model have the correct fields for the MySQL database? It's\n> likely that the adapter is sending a SELECT field1, field2, field3 ...\n> query to MySQL rather than the dreaded SELECT * .... If that's the case,\n> your model may not be providing the right field names for the query to\n> return anything.\n>\n> If your MySQL DB and Sails models are configured the same, there's no need\n> to migrate anything. Migration is useful when your DB schema is being\n> changed frequently during development when you add or modify fields in your\n> model, so you don't have to manually modify your DB schema each time you\n> want to make a change.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/balderdashy/sails/issues/3109#issuecomment-125238101>.\n>\n\n\n\n-- \n*Ytzvan A. Mastino*\n<http://compreoalquile.com>+507-6780-9892\n"}}