{"id":16531371,"url":"https://github.com/marcbachmann/knex-umzug","last_synced_at":"2025-09-13T23:32:17.310Z","repository":{"id":10494278,"uuid":"64423780","full_name":"marcbachmann/knex-umzug","owner":"marcbachmann","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-15T20:26:16.000Z","size":183,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T04:50:23.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcbachmann.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}},"created_at":"2016-07-28T19:49:54.000Z","updated_at":"2022-03-11T22:27:36.000Z","dependencies_parsed_at":"2024-06-19T05:27:33.279Z","dependency_job_id":"baeee237-8723-4951-8f47-49bbb0c3783a","html_url":"https://github.com/marcbachmann/knex-umzug","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fknex-umzug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fknex-umzug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fknex-umzug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fknex-umzug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcbachmann","download_url":"https://codeload.github.com/marcbachmann/knex-umzug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232931886,"owners_count":18598663,"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-10-11T18:08:38.743Z","updated_at":"2025-01-07T20:07:09.113Z","avatar_url":"https://github.com/marcbachmann.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# knex-umzug\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/marcbachmann/knex-umzug.svg)](https://greenkeeper.io/)\n\nA storage adapter for umzug, a database migration library.\n\nIt supports namespacing and custom database table names.\nThis storage adapter not only shows you the current state of a migration but also shows all the migration paths and tracks hostname and system user which executed a migration.\n\nThis library only makes `knex` work with `umzug`.\nPlease check out the umzug api for more details: https://www.npmjs.com/package/umzug#api\n\nUmzug v3:\n```js\nconst {Umzug} = require('umzug')\nconst knex = require('knex')\nconst KnexUmzug = require('knex-umzug')\n\nconst db = require('knex')({\n  client: 'sqlite3',\n  connection: {filename: './db.sql'}\n})\n\nconst umzug = new Umzug({\n  storage: new KnexUmzug({\n    // The context allows you to reuse the same migrations table\n    // to maintain the state for multiple isolated migration setups.\n    // e.g. 'upstream', 'downstream'\n    context: 'default',\n    connection: db,\n    tableName: 'migrations'\n  })\n})\n\numzug.up().then(function (result) {\n\n})\n```\n\nUmzug v2:\n```js\nconst Umzug = require('umzug')\nconst db = require('knex')({\n    client: 'sqlite3',\n    connection: {filename: './db.sql'}\n})\n\nconst umzug = new Umzug({\n    storage: 'knex-umzug',\n    storageOptions: {\n      // The context allows you to reuse the same migrations table\n      // to maintain the state for multiple isolated migration setups.\n      // e.g. 'upstream', 'downstream'\n      context: 'default',\n      connection: db,\n      tableName: 'migrations'\n    }\n})\n\numzug.up().then(function (result) {\n\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcbachmann%2Fknex-umzug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcbachmann%2Fknex-umzug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcbachmann%2Fknex-umzug/lists"}