{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/7831","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/7831/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/7831/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/7831/events","html_url":"https://github.com/yiisoft/yii2/issues/7831","id":63558846,"number":7831,"title":"Schema detects tables without explicit order","user":{"login":"nineinchnick","id":795177,"avatar_url":"https://avatars.githubusercontent.com/u/795177?v=3","gravatar_id":"","url":"https://api.github.com/users/nineinchnick","html_url":"https://github.com/nineinchnick","followers_url":"https://api.github.com/users/nineinchnick/followers","following_url":"https://api.github.com/users/nineinchnick/following{/other_user}","gists_url":"https://api.github.com/users/nineinchnick/gists{/gist_id}","starred_url":"https://api.github.com/users/nineinchnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nineinchnick/subscriptions","organizations_url":"https://api.github.com/users/nineinchnick/orgs","repos_url":"https://api.github.com/users/nineinchnick/repos","events_url":"https://api.github.com/users/nineinchnick/events{/privacy}","received_events_url":"https://api.github.com/users/nineinchnick/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/feature:gii","name":"feature:gii","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-22T17:53:51Z","updated_at":"2015-03-22T19:26:48Z","closed_at":null,"body":"The `pgsql\\Schema.findTables`, `pgsql\\Schema.findConstraints` and possibly `Schema` for other databases does not fetch table names with explicit order. Since the default order may change randomly, gii would produce different results for relations where numbers are appended to the name."},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/84682830","html_url":"https://github.com/yiisoft/yii2/issues/7831#issuecomment-84682830","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/7831","id":84682830,"user":{"login":"nineinchnick","id":795177,"avatar_url":"https://avatars.githubusercontent.com/u/795177?v=3","gravatar_id":"","url":"https://api.github.com/users/nineinchnick","html_url":"https://github.com/nineinchnick","followers_url":"https://api.github.com/users/nineinchnick/followers","following_url":"https://api.github.com/users/nineinchnick/following{/other_user}","gists_url":"https://api.github.com/users/nineinchnick/gists{/gist_id}","starred_url":"https://api.github.com/users/nineinchnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nineinchnick/subscriptions","organizations_url":"https://api.github.com/users/nineinchnick/orgs","repos_url":"https://api.github.com/users/nineinchnick/repos","events_url":"https://api.github.com/users/nineinchnick/events{/privacy}","received_events_url":"https://api.github.com/users/nineinchnick/received_events","type":"User","site_admin":false},"created_at":"2015-03-22T19:26:48Z","updated_at":"2015-03-22T19:26:48Z","body":"I found a bug in `findConstraints` where composite fkeys would be randomly assigned to table columns. This should be probably fixed for other schemas, not only PostgreSQL."}}