* feat(types): move Emigrate types to separate package Also refactor the types to use discriminating unions for easier error handling and such. Errors passed to storage plugins should now be serialized and storage plugins are expected to return already serialized errors on failed history entries. * fix(mysql): handle the new type changes * fix(storage-fs): handle the new type changes * feat(cli): better error handling and types Adapt to the new types from the @emigrate/types package, like discriminating union types and serializing and deserializing errors |
||
|---|---|---|
| .. | ||
| src | ||
| CHANGELOG.md | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
@emigrate/plugin-generate-js
This package contains an Emigrate plugin for generating migration files using JavaScript as a language.
Usage
Install the package:
npm install --save-dev @emigrate/plugin-generate-js
Use the plugin with the emigrate new command:
emigrate new --plugin generate-js create some fancy table
Or add it to your emigrate.config.js file:
import generateJs from '@emigrate/plugin-generate-js';
export default {
directory: 'migrations',
plugins: [generateJs],
};