{"id":30752659,"url":"https://github.com/blackglory/deno-sqlite-migrations","last_synced_at":"2026-06-23T03:31:28.271Z","repository":{"id":309598353,"uuid":"1036683737","full_name":"BlackGlory/deno-sqlite-migrations","owner":"BlackGlory","description":"🌿","archived":false,"fork":false,"pushed_at":"2026-02-11T05:55:12.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-11T12:32:15.556Z","etag":null,"topics":["deno","jsr-package","library","typescript"],"latest_commit_sha":null,"homepage":"https://jsr.io/@blackglory/sqlite-migrations","language":"TypeScript","has_issues":true,"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/BlackGlory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-08-12T12:40:46.000Z","updated_at":"2026-02-11T05:55:16.000Z","dependencies_parsed_at":"2025-08-12T20:37:21.712Z","dependency_job_id":null,"html_url":"https://github.com/BlackGlory/deno-sqlite-migrations","commit_stats":null,"previous_names":["blackglory/deno-sqlite-migrations"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/BlackGlory/deno-sqlite-migrations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fdeno-sqlite-migrations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fdeno-sqlite-migrations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fdeno-sqlite-migrations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fdeno-sqlite-migrations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlackGlory","download_url":"https://codeload.github.com/BlackGlory/deno-sqlite-migrations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fdeno-sqlite-migrations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34674702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"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"}},"keywords":["deno","jsr-package","library","typescript"],"created_at":"2025-09-04T08:35:59.283Z","updated_at":"2026-06-23T03:31:28.267Z","avatar_url":"https://github.com/BlackGlory.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deno-sqlite-migrations\nA utility for database migrations with [sqlite3].\n\nThe module using [user_version] to record the schema version.\n\n[sqlite3]: https://github.com/denodrivers/sqlite3\n[user_version]: https://www.sqlite.org/pragma.html#pragma_user_version\n\n## Install\n```sh\ndeno add jsr:@blackglory/sqlite-migrations\n```\n\n## API\n```ts\ninterface IMigration {\n  // An integer starting from 1\n  version: number\n\n  up: string | ((db: Database) =\u003e void)\n  down: string | ((db: Database) =\u003e void)\n}\n```\n\nYou may need [migration-files].\n\n[migration-files]: https://github.com/BlackGlory/migration-files\n\n### migrate\n```ts\nfunction migrate(\n  db: Database\n, migrations: IMigration[]\n, options?: {\n    targetVersion?: number\n    throwOnNewerVersion?: boolean = false\n  }\n): void\n```\n\nIf `options.targetVersion` is `undefined`,\nthe maximum version of the `migrations` is used.\n\nWhen the maximum known migration version is less than the `user_version`,\nit means the current instance is outdated.\n- When `options.throwOnNewerVersion` is `false` (default),\n  it will skip the migration,\n  so your outdated instance continues to run.\n- When `options.throwOnNewerVersion` is `true`,\n  it will throw an error,\n  so your outdated instance fails immediately.\n\n#### Can multiple instances migrate in parallel?\nYes, the `user_version` update is visible to every database connection.\n\nEach migration uses `BEGIN IMMEDIATE` to ensure that parallel write transactions fail early.\nTherefore, you may need a proper retry strategy.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackglory%2Fdeno-sqlite-migrations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackglory%2Fdeno-sqlite-migrations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackglory%2Fdeno-sqlite-migrations/lists"}