{"id":16627124,"url":"https://github.com/ttulka/sql-tables-sorter","last_synced_at":"2026-04-22T01:31:11.163Z","repository":{"id":95750395,"uuid":"98153941","full_name":"ttulka/sql-tables-sorter","owner":"ttulka","description":"SQL Tables Sorter","archived":false,"fork":false,"pushed_at":"2017-07-25T06:32:46.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T12:52:16.370Z","etag":null,"topics":["database","java","schema","sql","sql-tables-sorter","table"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ttulka.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-24T05:55:13.000Z","updated_at":"2018-01-17T09:30:58.000Z","dependencies_parsed_at":"2023-05-21T21:30:24.566Z","dependency_job_id":null,"html_url":"https://github.com/ttulka/sql-tables-sorter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ttulka/sql-tables-sorter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttulka%2Fsql-tables-sorter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttulka%2Fsql-tables-sorter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttulka%2Fsql-tables-sorter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttulka%2Fsql-tables-sorter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttulka","download_url":"https://codeload.github.com/ttulka/sql-tables-sorter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttulka%2Fsql-tables-sorter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32117322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"ssl_error","status_checked_at":"2026-04-22T00:30:22.894Z","response_time":128,"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":["database","java","schema","sql","sql-tables-sorter","table"],"created_at":"2024-10-12T04:13:27.853Z","updated_at":"2026-04-22T01:31:11.133Z","avatar_url":"https://github.com/ttulka.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQL Tables Sorter\n\nCalculates the right order of the tables from a SQL creation script (for example an SQL script generated from `mysqldump` etc.).\n\n## Prerequisites\n- Java 8\n- Maven \n\n## Usage\n\nFirst, clone or fork the repository:\n```\n$ git clone git@github.com:ttulka/sql-tables-sorter.git\n$ cd sql-tables-sorter\n```\nNow build it:\n```\n$ mvn clean package\n```\nAnd finally run it: \n```\n$ java -jar target/SqlTablesSorter-1.0-SNAPSHOT.jar -f \u003cpath_to_SQL_creaton_script\u003e\n```\n\n### Example\n\n*dump.sql*\n```sql\nCREATE TABLE `attachment` (\n    id INT, \n    name VARCHAR(100),\n    content TEXT,\n    document_id INT,\n    CONSTRAINT `fk_document` FOREIGN KEY (`document_id`) REFERENCES `document` (`id`)\n  );\nCREATE TABLE `document` (\n  id INT,\n  title VARCHAR(100),\n  content TEXT,\n  patient_id INT,\n  CONSTRAINT `fk_patient` FOREIGN KEY (`patient_id`) REFERENCES `patient` (`id`)\n);\nCREATE TABLE `patient` (\n  id INT, \n  full_name VARCHAR(100)\n);\n```\n```\n$ java -jar target/SqlTablesSorter-1.0-SNAPSHOT.jar -f dump.sql\n```\nOutput\n```\npatient\ndocument\nattachment\n```\n\n\n## License\n\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttulka%2Fsql-tables-sorter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttulka%2Fsql-tables-sorter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttulka%2Fsql-tables-sorter/lists"}