Loader Plugins
Loader plugins are used to transform any file type into a JavaScript function that will be called when the migration file is executed.
Out of the box, Emigrate supports the following file extensions: .js
, .cjs
, .mjs
, .ts
, .cts
and .mts
. And both CommonJS and ES Modules are supported. See the Default Loader for more information.
Using a loader plugin
You can specify a loader plugin via the --plugin
(or -p
for short) option:
Or set it up in your configuration file, see Plugin configuration for more information.
Available Loader Plugins
Default Loader The loader responsible for loading .js, .cjs, .mjs, .ts, .cts and .mts files
PostgreSQL Loader Can load and execute .sql files against a PostgreSQL database
MySQL Loader Can load and execute .sql files against a MySQL database