{"id":18449258,"url":"https://github.com/sqldef/sqldef-ruby","last_synced_at":"2025-04-08T01:32:49.151Z","repository":{"id":56896731,"uuid":"347327270","full_name":"sqldef/sqldef-ruby","owner":"sqldef","description":"Ruby interface for sqldef","archived":false,"fork":false,"pushed_at":"2024-01-11T02:04:45.000Z","size":17,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-23T03:51:17.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":false,"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/sqldef.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}},"created_at":"2021-03-13T09:29:05.000Z","updated_at":"2022-03-09T08:27:05.000Z","dependencies_parsed_at":"2022-08-21T01:20:31.887Z","dependency_job_id":null,"html_url":"https://github.com/sqldef/sqldef-ruby","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqldef%2Fsqldef-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqldef%2Fsqldef-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqldef%2Fsqldef-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqldef%2Fsqldef-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sqldef","download_url":"https://codeload.github.com/sqldef/sqldef-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247760681,"owners_count":20991526,"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":[],"created_at":"2024-11-06T07:19:24.788Z","updated_at":"2025-04-08T01:32:48.913Z","avatar_url":"https://github.com/sqldef.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sqldef-ruby\n\nRuby interface to call [sqldef](https://github.com/k0kubun/sqldef).\n\n## Installation\n\n```ruby\ngem 'sqldef'\n```\n\n## Usage\n### Download\n\nYou can download `mysqldef`, `psqldef`, or `sqlite3def`.\n\n```rb\nSqldef.bin = './bin'\nSqldef.download(:psqldef)\n```\n\n`download` is automatically executed by the following methods too.\n\n### Export\n\nYou can export the database schema to a file.\n\n```rb\nSqldef.export(\n  command:  :psqldef,\n  host:     host,\n  port:     port,\n  user:     user,\n  password: password,\n  database: database,\n  path:     'db/schema.sql',\n)\n```\n\n### Dry Run\n\nYou can show DDLs to be executed.\n\n```rb\nSqldef.dry_run(\n  command:  :psqldef,\n  host:     host,\n  port:     port,\n  user:     user,\n  password: password,\n  database: database,\n  path:     'db/schema.sql',\n)\n```\n\n### Apply\n\nYou can run DDLs to match the schema.\n\n```rb\nSqldef.apply(\n  command:  :psqldef,\n  host:     host,\n  port:     port,\n  user:     user,\n  password: password,\n  database: database,\n  path:     'db/schema.sql',\n)\n```\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqldef%2Fsqldef-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsqldef%2Fsqldef-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqldef%2Fsqldef-ruby/lists"}