Gathering detailed insights and metrics for @emigrate/cli
Gathering detailed insights and metrics for @emigrate/cli
Gathering detailed insights and metrics for @emigrate/cli
Gathering detailed insights and metrics for @emigrate/cli
The modern, modular and flexible migration tool for any database
npm install @emigrate/cli
Typescript
Module System
Node Version
NPM Version
Release 2025-04-24T14:07:35.591Z
Updated on Apr 24, 2025
@emigrate/mysql@0.3.2
Updated on Jun 25, 2024
@emigrate/types@0.12.2
Updated on May 30, 2024
@emigrate/storage-fs@0.4.7
Updated on May 30, 2024
@emigrate/reporter-pino@0.6.4
Updated on May 30, 2024
@emigrate/postgres@0.3.1
Updated on May 30, 2024
TypeScript (90.42%)
JavaScript (9.43%)
Shell (0.16%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
255 Commits
1 Forks
3 Watchers
12 Branches
1 Contributors
Updated on Apr 25, 2025
Minified
Minified + Gzipped
Latest Version
0.18.4
Package Id
@emigrate/cli@0.18.4
Unpacked Size
277.90 kB
Size
47.04 kB
File Count
127
NPM Version
10.9.2
Node Version
22.15.0
Published on
Apr 24, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Emigrate is a tool for managing database migrations. It is designed to be simple yet support advanced setups, modular and extensible.
📖 Read the documentation for more information!
Install the Emigrate CLI in your project:
1npm install @emigrate/cli 2# or 3pnpm add @emigrate/cli 4# or 5yarn add @emigrate/cli 6# or 7bun add @emigrate/cli
1Usage: emigrate <options>/<command> 2 3Options: 4 5 -h, --help Show this help message and exit 6 -v, --version Print version number and exit 7 8Commands: 9 10 up Run all pending migrations (or do a dry run) 11 new Create a new migration file 12 list List all migrations and their status 13 remove Remove entries from the migration history
emigrate up
1Usage: emigrate up [options] 2 3Run all pending migrations 4 5Options: 6 7 -h, --help Show this help message and exit 8 9 -d, --directory <path> The directory where the migration files are located (required) 10 11 -i, --import <module> Additional modules/packages to import before running the migrations (can be specified multiple times) 12 For example if you want to use Dotenv to load environment variables or when using TypeScript 13 14 -s, --storage <name> The storage to use for where to store the migration history (required) 15 16 -p, --plugin <name> The plugin(s) to use (can be specified multiple times) 17 18 -r, --reporter <name> The reporter to use for reporting the migration progress 19 20 -l, --limit <count> Limit the number of migrations to run 21 22 -f, --from <name/path> Start running migrations from the given migration name or relative file path to a migration file, 23 the given name or path needs to exist. The same migration and those after it lexicographically will be run 24 25 -t, --to <name/path> Skip migrations after the given migration name or relative file path to a migration file, 26 the given name or path needs to exist. The same migration and those before it lexicographically will be run 27 28 --dry List the pending migrations that would be run without actually running them 29 30 --color Force color output (this option is passed to the reporter) 31 32 --no-color Disable color output (this option is passed to the reporter) 33 34 --no-execution Mark the migrations as executed and successful without actually running them, 35 which is useful if you want to mark migrations as successful after running them manually 36 37 --abort-respite <sec> The number of seconds to wait before abandoning running migrations after the command has been aborted (default: 10) 38 39Examples: 40 41 emigrate up --directory src/migrations -s fs 42 emigrate up -d ./migrations --storage @emigrate/mysql 43 emigrate up -d src/migrations -s postgres -r json --dry 44 emigrate up -d ./migrations -s mysql --import dotenv/config 45 emigrate up --limit 1 46 emigrate up --to 20231122120529381_some_migration_file.js 47 emigrate up --to 20231122120529381_some_migration_file.js --no-execution
Create a new migration:
1npx emigrate new -d migrations create some fancy table 2# or 3pnpm emigrate new -d migrations create some fancy table 4# or 5yarn emigrate new -d migrations create some fancy table 6# or 7bunx --bun emigrate new -d migrations create some fancy table
Will create a new empty JavaScript migration file with the name "YYYYMMDDHHmmssuuu_create_some_fancy_table.js" in the migrations
directory.
No vulnerabilities found.
No security vulnerabilities found.