A migration tool for RethinkDB databases, version 0.3.6. It allows forward and backward migration of structural or data changes using a versioned approach. This is a fork of rethink-migrate with more active maintenance. It supports TypeScript, environment variable overrides, and CLI commands for creating and running migrations. Release cadence is irregular; last update was in 2017.
npm install rethinkdb-ts-migrateNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
This shows how to install the CLI tool globally. However, it's recommended to use npx instead: npx rethinkdb-ts-migrate create add-tables.
Consider using an alternative like flyway-rethinkdb or writing your own migration scripts.
Use exports.up = function(r, conn) { ... }; exports.down = function(r, conn) { ... };Ensure database.json is in the root or use environment variables: RDB_HOST, RDB_PORT, RDB_DB.
Wrap your migration logic in a function that returns a promise: exports.up = async (r, conn) => { await r.tableCreate('foo').run(conn); }Run: npx rethinkdb-ts-migrate up --all
Run: npm install --save rethinkdb
Create a database.json file in the root directory with required connection settings.
Use: exports.up = function(r, conn) { return r.tableCreate('foo').run(conn); };