typesense-migrations

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i typesense-migrations

Weekly Downloads

37

Version

1.0.0

License

MIT

Unpacked Size

20.4 kB

Total Files

23

Last publish

Collaborators

  • tiagodamascena