0.0.2 • Published 7 months ago

elasticsearch-index-migrator v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Elasticsearch Index Migration

This repository contains scripts for managing Elasticsearch index migrations using the elasticsearch-index-migrator tool.

Installation

yarn add elasticsearch-index-migrator

Cli options

The cli options is used to configure and provide options for the Elasticsearch migration scripts. Below is a table that describes each option:

PropertyDescription
commandSpecifies the command to be executed (e.g., createEmptyMigration or runMigrations).
migrationsDirSpecifies the directory where migration files are stored.
migrationNameSpecifies the name of the new migration.
migrationFileExtensionSpecifies the file extension for migration files (e.g., .js, .ts).
filePatternsAn array of file patterns used to identify migration files within the migrationsDir (default: *.js, *.ts).

Add these command to package.json file:

"elasticsearch-create-migration": "node -r ts-node/register -r tsconfig-paths/register ./node_modules/.bin/elasticsearch-index-migrator --command=createEmptyMigration --migrationsDir=./elasticsearch-migrations --migrationName=Test",
"elasticsearch-run-migrations": "node -r ts-node/register -r tsconfig-paths/register ./node_modules/.bin/elasticsearch-index-migrator --command=runMigrations --migrationsDir=./elasticsearch-migrations"

This package uses these environment variables to pass Elasticsearch authorizations by default:

process.env.ELASTICSEARCH_NODE_URL;
process.env.ELASTICSEARCH_PASSWORD;
process.env.ELASTICSEARCH_USERNAME;
0.0.2

7 months ago

0.0.1

7 months ago

0.0.6-alpha

8 months ago

0.0.5-alpha

8 months ago

0.0.4-alpha

8 months ago

0.0.3-alpha

8 months ago

0.0.2-alpha

8 months ago

0.0.1-alpha

8 months ago