{"id":47298,"library":"connect-migration-store","title":"connect-migration-store","description":"A session store wrapper for Express/Connect that enables zero-downtime migration from one session store to another. Version 1.1.4 is the current stable release with low release cadence. It wraps two stores (e.g., Redis and DynamoDB) and transparently forwards reads and writes to both during migration. Unlike manual migration scripts, it preserves user sessions without forced logout. ESM-only not supported; CommonJS only.","status":"active","version":"1.1.4","language":"javascript","source_language":"en","source_url":"https://github.com/CoorpAcademy/connect-migration-store","tags":["javascript","express","connect","session","store","migration"],"install":[{"cmd":"npm install connect-migration-store","lang":"bash","label":"npm"},{"cmd":"yarn add connect-migration-store","lang":"bash","label":"yarn"},{"cmd":"pnpm add connect-migration-store","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package exports a function that must be called with the session module (express-session). CommonJS only; no ESM support.","wrong":"const MigrationStore = require('connect-migration-store');","symbol":"MigrationStore","correct":"const MigrationStore = require('connect-migration-store')(session);"},{"note":"Constructor requires an object with 'from' and 'to' store instances.","wrong":"const store = new MigrationStore();","symbol":"SessionStore","correct":"const store = new MigrationStore({from: originalStore, to: newStore});"}],"quickstart":{"code":"const express = require('express');\nconst session = require('express-session');\nconst RedisStore = require('connect-redis')(session);\nconst DynamoDBStore = require('connect-dynamodb')({session});\nconst MigrationStore = require('connect-migration-store')(session);\n\nconst app = express();\nconst redisStore = new RedisStore({ url: process.env.REDIS_URL ?? 'redis://localhost:6379' });\nconst dynamoStore = new DynamoDBStore({ table: process.env.DYNAMODB_TABLE ?? 'sessions' });\nconst migrationStore = new MigrationStore({ from: redisStore, to: dynamoStore });\n\napp.use(session({ store: migrationStore, secret: 'your-secret', resave: false, saveUninitialized: false }));\napp.get('/', (req, res) => { res.send('Session migrated!'); });\napp.listen(3000);","lang":"javascript","description":"Creates a MigrationStore wrapping Redis (original) and DynamoDB (new) stores, using it with express-session middleware."},"warnings":[{"fix":"Use require('connect-migration-store')(session) to get the store class.","message":"The require('connect-migration-store') returns a function that must be called with the session module, not the store constructor directly.","severity":"gotcha","affected_versions":"*"},{"fix":"Ensure both stores are from express-session compatible packages (e.g., connect-redis, connect-dynamodb).","message":"Both 'from' and 'to' stores must implement the Express session store API (get, set, destroy, etc.). Incompatible stores may cause silent failures.","severity":"gotcha","affected_versions":"*"},{"fix":"Use require() or dynamic import with createRequire.","message":"This package is CommonJS-only; it does not provide ESM exports. Using import in an ESM project will fail.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'1.1.4':24 'anoth':22 'cadenc':33 'commonj':68 'connect':2,72 'connect-migration-stor':1 'current':27 'downtim':15 'dynamodb':41 'e.g':38 'enabl':12 'esm':64 'esm-on':63 'express':71 'express/connect':10 'forc':61 'forward':44 'javascript':70 'logout':62 'low':31 'manual':53 'migrat':3,16,51,54,75 'one':18 'preserv':57 'read':45 'redi':39 'releas':29,32 'script':55 'session':6,19,59,73 'stabl':28 'store':4,7,20,37,74 'support':67 'transpar':43 'two':36 'unlik':52 'user':58 'version':23 'without':60 'wrap':35 'wrapper':8 'write':47 'zero':14 'zero-downtim':13","created_at":"2026-06-07T16:50:48.750405+00:00","updated_at":"2026-06-07T16:50:48.750405+00:00","problems":[{"fix":"const MigrationStore = require('connect-migration-store')(session);","cause":"The required module is a function that must be called with the session module first.","error":"TypeError: MigrationStore is not a constructor"},{"fix":"npm install connect-migration-store","cause":"Package not installed or typo in package name.","error":"Error: Cannot find module 'connect-migration-store'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/CoorpAcademy/connect-migration-store#readme","github":"https://github.com/CoorpAcademy/connect-migration-store","docs":null,"changelog":null,"pypi":null,"npm":"connect-migration-store","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}