Skip to content

TiagoDamascena/typesense-migrations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typesense Migrations

A simple migration manager for Typesense. Apply changes to your collections during deploy and easily revert them if needed.

Installation

Install it on your project using npm

npm install --save-dev typesense-migrations

Configuration

Add a config file to the root of your project named typesense-migrations.js and use it to configure a custom migrations folder and collection name if needed and also the configurations of the Typesense client.

module.exports = {
  folder: 'migrations',
  collection: '_migrations',
  client: {
    nodes: [
      {
        host: 'localhost',
        port: 8108,
        protocol: 'http',
      },
    ],
    apiKey: 'secret',
  },
};

Usage

npx typesense-migrations generate <name>        Generates a new migration file
npx typesense-migrations migrate                Run all pending migrations
npx typesense-migrations rollback               Reverst the last batch of migrations

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published