{"id":49225473,"url":"https://github.com/tonicai/fk_detect","last_synced_at":"2026-04-24T07:02:14.950Z","repository":{"id":98140379,"uuid":"187926669","full_name":"TonicAI/fk_detect","owner":"TonicAI","description":null,"archived":false,"fork":false,"pushed_at":"2020-02-06T19:23:34.000Z","size":41,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-11-24T06:33:00.321Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TonicAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-05-21T23:11:09.000Z","updated_at":"2022-05-28T09:58:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"af7848d8-78bd-40a7-9e0f-216e6ad12f05","html_url":"https://github.com/TonicAI/fk_detect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TonicAI/fk_detect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonicAI%2Ffk_detect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonicAI%2Ffk_detect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonicAI%2Ffk_detect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonicAI%2Ffk_detect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TonicAI","download_url":"https://codeload.github.com/TonicAI/fk_detect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonicAI%2Ffk_detect/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32212808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T03:15:14.334Z","status":"ssl_error","status_checked_at":"2026-04-24T03:15:11.608Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-24T07:02:12.030Z","updated_at":"2026-04-24T07:02:14.940Z","avatar_url":"https://github.com/TonicAI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Instructions\n\nHere's the output of `$ python fk_detect.py -h`\n\n```\n$ python fk_detect.py -h\nusage: fk_detect.py [-h] -t DBTYPE -H HOST -p PORT -u USER [--no-password]\n                    [--password-file PASSWORD_FILE] [--ssl] [-d DB]\n                    [-o OUTPUT] [-U]\n\nFinds foreign keys in a database. This is accomplished with a combination of\nusing foreign key constraints and using column and table names. For example,\nif a column is named user_id, and there is a table called user with an id\ncolumn, a foreign key will be reported.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -t DBTYPE, --dbtype DBTYPE\n                        type of DB to connect to, valid values are \"mysql\" and\n                        \"postgres\"\n  -H HOST, --host HOST  host to connect to\n  -p PORT, --port PORT  port to connect to\n  -u USER, --user USER  user to connect with\n  --no-password         connect without a password. otherwise provide\n                        onethrough a file with --password-file\n  --password-file PASSWORD_FILE\n                        location of a file that contains the password to the\n                        database, see README.md for format\n  --ssl                 force the connection over SSL\n  -d DB, --db DB        database to connect to (optional in MySQL)\n  -o OUTPUT, --output OUTPUT\n                        output file, stdout is default\n  -U, --union-constraints\n                        output proposed foreign keys unioned with known\n                        foreign key constraints. By default fk_detect does not\n                        output foreign keys represented as constraints in the\n                        database. Enabling this switch will union them to the\n                        proposed constraints.\n```\n\n# Example\n\nExample, using Postgres:\n\n```\n$ python fk_detect -t postgres -H localhost -p 5432 -u user -d test_data --password-file password-file\n```\n\n# Password file format\n\nUse a single line with nothing but the password in it, e.g., if your password is `hunter2`, the following file should be used:\n\n```\nhunter2\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonicai%2Ffk_detect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonicai%2Ffk_detect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonicai%2Ffk_detect/lists"}