{"action":"created","issue":{"url":"https://api.github.com/repos/coleifer/peewee/issues/1021","repository_url":"https://api.github.com/repos/coleifer/peewee","labels_url":"https://api.github.com/repos/coleifer/peewee/issues/1021/labels{/name}","comments_url":"https://api.github.com/repos/coleifer/peewee/issues/1021/comments","events_url":"https://api.github.com/repos/coleifer/peewee/issues/1021/events","html_url":"https://github.com/coleifer/peewee/issues/1021","id":166729409,"number":1021,"title":"pwiz not generating foreign key fields for postgres","user":{"login":"maknoaa","id":20570382,"avatar_url":"https://avatars.githubusercontent.com/u/20570382?v=3","gravatar_id":"","url":"https://api.github.com/users/maknoaa","html_url":"https://github.com/maknoaa","followers_url":"https://api.github.com/users/maknoaa/followers","following_url":"https://api.github.com/users/maknoaa/following{/other_user}","gists_url":"https://api.github.com/users/maknoaa/gists{/gist_id}","starred_url":"https://api.github.com/users/maknoaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maknoaa/subscriptions","organizations_url":"https://api.github.com/users/maknoaa/orgs","repos_url":"https://api.github.com/users/maknoaa/repos","events_url":"https://api.github.com/users/maknoaa/events{/privacy}","received_events_url":"https://api.github.com/users/maknoaa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2016-07-21T03:23:24Z","updated_at":"2016-08-09T05:18:10Z","closed_at":"2016-07-27T14:05:47Z","body":"Hi @coleifer \r\n\r\nI have the same issue as https://github.com/coleifer/peewee/issues/207\r\nwith postgres however\r\n\r\n\r\nI used the command\r\npython -m pwiz -e postgresql -u USERNAME -P DATABASE -H HOST-p PORT-s SCHEMA> model.py\r\n\r\n\r\nMy model did not contain any \"ForeignKeyField\" \r\n\r\nAny thoughts? Does pwiz create foreign key for postgres?"},"comment":{"url":"https://api.github.com/repos/coleifer/peewee/issues/comments/238456057","html_url":"https://github.com/coleifer/peewee/issues/1021#issuecomment-238456057","issue_url":"https://api.github.com/repos/coleifer/peewee/issues/1021","id":238456057,"user":{"login":"coleifer","id":119974,"avatar_url":"https://avatars.githubusercontent.com/u/119974?v=3","gravatar_id":"","url":"https://api.github.com/users/coleifer","html_url":"https://github.com/coleifer","followers_url":"https://api.github.com/users/coleifer/followers","following_url":"https://api.github.com/users/coleifer/following{/other_user}","gists_url":"https://api.github.com/users/coleifer/gists{/gist_id}","starred_url":"https://api.github.com/users/coleifer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coleifer/subscriptions","organizations_url":"https://api.github.com/users/coleifer/orgs","repos_url":"https://api.github.com/users/coleifer/repos","events_url":"https://api.github.com/users/coleifer/events{/privacy}","received_events_url":"https://api.github.com/users/coleifer/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T05:18:10Z","updated_at":"2016-08-09T05:18:10Z","body":"I'm sorry it's been a while since I replied. I am not familiar with Postgres enough to be able to answer your questions. Peewee queries `information_schema`, so I would assume the user running `pwiz` would need to be able to query those tables. Have you taken a look at peewee's `PostgresqlDatabase.get_tables()` and other introspection functions? Those contain the SQL used, which you could try running from a postgres shell."}}
{"actor":{"display_login":"coleifer"}}