{"id":44716184,"url":"https://github.com/ae0000/dbdiff","last_synced_at":"2026-02-15T14:01:30.099Z","repository":{"id":57746086,"uuid":"150063617","full_name":"ae0000/dbdiff","owner":"ae0000","description":"Creates a diff (as SQL updates) between to database structures","archived":false,"fork":false,"pushed_at":"2018-09-24T06:54:24.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-15T05:16:05.333Z","etag":null,"topics":["golang","mysql","tool"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/ae0000.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}},"created_at":"2018-09-24T06:35:53.000Z","updated_at":"2023-05-30T11:14:36.000Z","dependencies_parsed_at":"2022-09-01T17:03:45.854Z","dependency_job_id":null,"html_url":"https://github.com/ae0000/dbdiff","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ae0000/dbdiff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ae0000%2Fdbdiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ae0000%2Fdbdiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ae0000%2Fdbdiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ae0000%2Fdbdiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ae0000","download_url":"https://codeload.github.com/ae0000/dbdiff/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ae0000%2Fdbdiff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29480862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T11:35:25.641Z","status":"ssl_error","status_checked_at":"2026-02-15T11:34:57.128Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["golang","mysql","tool"],"created_at":"2026-02-15T14:01:29.422Z","updated_at":"2026-02-15T14:01:30.090Z","avatar_url":"https://github.com/ae0000.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"DBDiff\n================================================\n\nVersion 0.2\n-----------\n\n\n\nDBDiff takes two (MySQL) database structures and works out the differences between the \ntwo. It then uses these diffs to create a list of SQL updates you would need to \nmake to align them.\n\nNotes:\n------\nThe following things are not yet handled.\n\n- [ ] triggers\n- [ ] stored procedures\n- [ ] views\n- [ ] other dbs besides mysql?\n\nComments are a little dicey as well.... \n\nHow to use:\n--------------\n\nFirstly get your DB structures, something like this:\n```\nmysqldump --user tt -p  \\\n--comments=FALSE \\\n--compact=TRUE \\\n--routines=TRUE \\\n--no-data \\\n--triggers=TRUE \\\ndatabasename \\\n | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\\*/\\*/' \u003e original.sql\n```\n\nYou should have _original.sql_ and _current.sql_.\n\nThen install this thing..\n```\ngo get github.com/ae0000/dbdiff\ncd to/where/ever/the/dbdiff/dir/ends/up\ngo install\n```\n\nThen to actually run the diff:\n```\ndbdiff diff --original original.sql --current current.sql\n```\n\nYou should then get something like this printed out:\n```\n-- :::::::::: Changes for  Addresses\n-- .....................................................\n-- Column   :  Town\n-- Original :  char(128) NOT NULL\n-- New      :  char(128) NOT NULL DEFAULT ''\nALTER TABLE `Addresses` MODIFY COLUMN Town char(128) NOT NULL DEFAULT '';\n-- .....................................................\n-- Column   :  Description\n-- Original :  text NOT NULL\n-- New      :  mediumtext NOT NULL\nALTER TABLE `Addresses` MODIFY COLUMN Description mediumtext NOT NULL;\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fae0000%2Fdbdiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fae0000%2Fdbdiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fae0000%2Fdbdiff/lists"}