{"id":18258021,"url":"https://github.com/vectorface/redis-migrate","last_synced_at":"2025-04-04T18:31:29.387Z","repository":{"id":16202977,"uuid":"18949797","full_name":"Vectorface/redis-migrate","owner":"Vectorface","description":"CLI tool to create and run redis key migrations","archived":false,"fork":false,"pushed_at":"2014-04-27T00:51:28.000Z","size":236,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-20T17:05:48.014Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vectorface.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":"2014-04-19T20:11:20.000Z","updated_at":"2020-06-22T07:23:19.000Z","dependencies_parsed_at":"2022-09-13T13:02:16.610Z","dependency_job_id":null,"html_url":"https://github.com/Vectorface/redis-migrate","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorface%2Fredis-migrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorface%2Fredis-migrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorface%2Fredis-migrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorface%2Fredis-migrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vectorface","download_url":"https://codeload.github.com/Vectorface/redis-migrate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247229384,"owners_count":20905040,"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-05T10:28:38.510Z","updated_at":"2025-04-04T18:31:28.960Z","avatar_url":"https://github.com/Vectorface.png","language":"JavaScript","readme":"redis-migrate\n=============\n\nCLI tool to create and run redis key migrations.\n\n[![Build Status](https://travis-ci.org/Vectorface/redis-migrate.png)](https://travis-ci.org/Vectorface/redis-migrate)\n\n## Overview\n\nA migration file consists of a single exported object with two keys: `up` and\n`down`. The current release is designed to be backwards compatible with Redis\n2.6 and 2.4. As such, it uses `KEYS`, which is blocking and should not be used\non a production db when dealing with any significant number of keys. Future\nreleases will allow for non-blocking operation using `SCAN`, `HSCAN`, etc.\n\n## Installation\n\nIt can be installed via `npm` using:\n\n```\nnpm install -g redis-migrate\n```\n\n## Usage\n\n```\nUsage: redis-migrate [up|down|create] \u003cmigrationName\u003e\n\nOptions:\n\n  -h, --help     output usage information\n  -V, --version  output the version number\n```\n\n## Example Migration File\n\n``` javascript\nexports.up = [\n  {\n    cmd: 'moveKeysToHashFields',\n    src: {key: /(app:user:\\d+):address/},\n    dst: {key: '$1:properties', field: 'address'}\n  },\n  {\n    cmd: 'renameKeys',\n    src: {key: /(app:post:\\d+):lastModifiedTimestamp/},\n    dst: {key: '$1:lastModified'}\n  }\n];\n\nexports.down = [\n  {\n    cmd: 'moveHashFieldsToKeys',\n    src: {key: /(app:user:\\d+):properties/, field: 'address'},\n    dst: {key: '$1:address'}\n  },\n  {\n    cmd: 'renameKeys',\n    src: {key: /(app:post:\\d+):lastModified/},\n    dst: {key: '$1:lastModifiedTimestamp'}\n  }\n];\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorface%2Fredis-migrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvectorface%2Fredis-migrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorface%2Fredis-migrate/lists"}