{"id":8882238,"name":"github.com/tailscale/squibble","ecosystem":"go","description":"Package squibble provides a schema migration assistant for SQLite databases.\n\nA Schema value manages the schema of a SQLite database that will be\nmodified over time.  The current database schema is stored in the Current\nfield, and migrations from previous versions are captured as UpdateRules.\n\nWhen the program starts up, it should pass the open database to the\nSchema.Apply method. This verifies that the Schema is valid, then checks\nwhether the database is up-to-date. If not, it applies any relevant update\nrules to bring it to the current state. If Apply fails, the database is\nrolled back.\n\nThe Schema tracks schema versions by hashing the schema with SHA256, and it\nstores a record of upgrades in a _schema_history table that it maintains.\nApply creates this table if it does not already exist, and updates it as\nupdate rules are applied.\n\nThe Updates field of the Schema must contain an ordered list of\nUpdateRule for each version of the schema prior to the Current one from\noldest to newest. Each rule has the hash of a previous schema version and a\nfunction that can be applied to the database to upgrade it to the next\nversion in sequence.\n\nWhen revising the schema, you must add a new rule mapping the old (existing)\nschema to the new one. These rules are intended to be a permanent record of\nchanges, and should be committed into source control as part of the\nprogram. As a consistency check, each rule must also declare the hash of the\ntarget schema it upgrades to.\n\nWhen Apply runs, it looks for the most recent version of the schema recorded\nin the _schema_history table. If there is none, and the database is\notherwise empty, the current schema is assumed to be the initial version,\nand it is applied directly. Otherwise, Apply compares the hash of the most\nrecent update to the current version: If they differ, it finds the most\nrecent update hash in the Updates list, and applies all the updates from\nthat point forward. If this succeeds, the current schema is recorded as the\nlatest version in _schema_history.\n\nYou use the Validate function to check that the current schema in the\nspecial sqlite_schema table maintained by SQLite matches a schema written as\nSQL text. If not, it reports a diff describing the differences between what\nthe text wants and what the real schema has.\n\nCurrently this package only handles the main database, not attachments.","homepage":"https://github.com/tailscale/squibble","licenses":"BSD-3-Clause","normalized_licenses":["BSD-3-Clause"],"repository_url":"https://github.com/tailscale/squibble","keywords_array":[],"namespace":"github.com/tailscale","versions_count":0,"first_release_published_at":null,"latest_release_published_at":"2026-01-14T12:42:35.705Z","latest_release_number":null,"last_synced_at":"2026-04-30T09:41:18.378Z","created_at":"2024-02-15T03:17:19.649Z","updated_at":"2026-04-30T09:41:18.378Z","registry_url":"https://pkg.go.dev/github.com/tailscale/squibble","install_command":"go get github.com/tailscale/squibble","documentation_url":"https://pkg.go.dev/github.com/tailscale/squibble#section-documentation","metadata":{},"repo_metadata":{"id":222572508,"uuid":"757779368","full_name":"tailscale/squibble","owner":"tailscale","description":"A lightweight schema manager for SQLite databases.","archived":false,"fork":false,"pushed_at":"2025-10-28T02:24:25.000Z","size":86,"stargazers_count":42,"open_issues_count":1,"forks_count":2,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-10-28T04:10:50.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tailscale.png","metadata":{"files":{"readme":"README.md","changelog":"history.sql","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-15T00:39:18.000Z","updated_at":"2025-10-28T02:24:28.000Z","dependencies_parsed_at":"2024-02-15T01:37:55.022Z","dependency_job_id":"8043220e-76a3-4590-8f97-7f9bb1199089","html_url":"https://github.com/tailscale/squibble","commit_stats":null,"previous_names":["tailscale/squibble"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tailscale/squibble","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailscale%2Fsquibble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailscale%2Fsquibble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailscale%2Fsquibble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailscale%2Fsquibble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailscale","download_url":"https://codeload.github.com/tailscale/squibble/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailscale%2Fsquibble/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281726177,"owners_count":26550920,"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","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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"},"owner_record":{"login":"tailscale","name":"Tailscale","uuid":"48932923","kind":"organization","description":"Tailscale is a WireGuard-based app that makes secure, private networks easy for teams of any scale.","email":"info@tailscale.com","website":"https://tailscale.com","location":"Canada","twitter":"tailscale","company":null,"icon_url":"https://avatars.githubusercontent.com/u/48932923?v=4","repositories_count":106,"last_synced_at":"2025-10-19T19:47:56.002Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/tailscale","funding_links":[],"total_stars":36597,"followers":2479,"following":0,"created_at":"2022-11-14T05:42:32.512Z","updated_at":"2025-10-19T19:47:56.002Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailscale","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailscale/repositories"},"tags":[]},"repo_metadata_updated_at":"2025-10-30T00:58:02.205Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":9.790624796450826,"dependent_packages_count":8.681507964653006,"stargazers_count":null,"forks_count":null,"docker_downloads_count":null,"average":9.236066380551916},"purl":"pkg:golang/github.com/tailscale/squibble","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/tailscale/squibble","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/tailscale/squibble","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/tailscale/squibble/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2025-10-28T05:08:56.913Z","issues_count":0,"pull_requests_count":0,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":null,"issues_closed_count":0,"pull_requests_closed_count":0,"pull_request_authors_count":0,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":null,"merged_pull_requests_count":0,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailscale%2Fsquibble/issues","maintainers":[],"active_maintainers":[]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Ftailscale%2Fsquibble/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Ftailscale%2Fsquibble/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Ftailscale%2Fsquibble/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Ftailscale%2Fsquibble/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Ftailscale%2Fsquibble/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Ftailscale%2Fsquibble/codemeta","maintainers":[]}