{"id":17877750,"url":"https://github.com/yshrsmz/sqlstitch","last_synced_at":"2026-02-16T09:19:08.962Z","repository":{"id":219455885,"uuid":"745902695","full_name":"yshrsmz/sqlstitch","owner":"yshrsmz","description":"Sort CREATE TABLEs by their relationships. Written in Rust.","archived":false,"fork":false,"pushed_at":"2025-03-10T22:58:21.000Z","size":100,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T08:22:26.273Z","etag":null,"topics":["mysql","rust","sql"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/yshrsmz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2024-01-20T13:55:21.000Z","updated_at":"2025-03-01T12:58:23.000Z","dependencies_parsed_at":"2024-03-26T02:26:25.300Z","dependency_job_id":"218c8817-d0a1-4345-969b-4be8b84ccf67","html_url":"https://github.com/yshrsmz/sqlstitch","commit_stats":null,"previous_names":["yshrsmz/sqlstitch"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yshrsmz%2Fsqlstitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yshrsmz%2Fsqlstitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yshrsmz%2Fsqlstitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yshrsmz%2Fsqlstitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yshrsmz","download_url":"https://codeload.github.com/yshrsmz/sqlstitch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244912800,"owners_count":20530764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["mysql","rust","sql"],"created_at":"2024-10-28T11:55:22.600Z","updated_at":"2026-02-16T09:19:08.956Z","avatar_url":"https://github.com/yshrsmz.png","language":"Rust","readme":"# sqlstitch\n\n`sqlstitch` is a command-line tool that reads SQL files, sorts them based on their foreign key constraints, and prints the sorted SQL statements to the standard output. The output is safe to execute as is, which means it can be directly used to create or modify a database schema.\n\n```shell\n$ sqlstitch --help\nUsage: sqlstich [OPTIONS] \u003cFILES\u003e...\n\nArguments:\n  \u003cFILES\u003e...  Input files to process\n\nOptions:\n  -v, --verbose  Prints debug information\n  -h, --help     Print help\n  -V, --version  Print version\n```\n\n## Usage\n\nYou can use `sqlstitch` by providing it with one or more SQL files as arguments. Here's the basic usage:\n\n```shell\n$ sqlstich \u003cFILES\u003e...\n```\n\nFor example, if you have a directory named schema containing your SQL files, you can sort all of them and write the output to a new SQL file like this:\n\n```shell\n$ sqlstich schema/*.sql \u003e sorted_schema.sql\n```\n\nThis will create a new file named sorted_schema.sql containing the sorted SQL statements.\n\n## Supported SQL Statements\n\nCurrently, `sqlstitch` supports the following SQL statements:\n\n- `CREATE TABLE`: This statement is used to create a new table in a database.\n- `CREATE INDEX`: This statement is used to create an index on one or more columns of a table.\n\nPlease note that other SQL statements present in the provided files will be ignored by `sqlstitch` in its current version. We are actively working on expanding the list of supported SQL statements. Stay tuned for updates!\n\n## Installation\n\nTo install `sqlstitch`, please refer to the [releases](https://github.com/yshrsmz/sqlstitch/releases) page. You'll find the latest version of sqlstitch there, along with instructions on how to install it.\n\n## Contributing\n\nIf you'd like to contribute to the development of sqlstitch, we'd love to have your help! You can start by checking out our open issues. If you find one that you'd like to work on, feel free to fork the repository and submit a pull request.\n\n### Update cargo-dist\n\n```shell\ncargo install cargo-dist --locked\ndist init\n```\n\n\n## License\n\n`sqlstitch` is licensed under the [Apache-2.0 License](https://opensource.org/license/apache-2-0/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyshrsmz%2Fsqlstitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyshrsmz%2Fsqlstitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyshrsmz%2Fsqlstitch/lists"}