emigrate/packages/storage-fs
Joakim Carlstein 871fb47aac
chore(release): version packages (#19)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-24 16:04:55 +01:00
..
src refactor(storage-fs): yield one migration entry at a time 2023-11-24 15:47:47 +01:00
CHANGELOG.md chore(release): version packages (#19) 2023-11-24 16:04:55 +01:00
package.json chore(release): version packages (#19) 2023-11-24 16:04:55 +01:00
README.md feat(storage-fs): adapt to the new storage option and rename the package 2023-11-22 14:35:35 +01:00
tsconfig.json feat(storage-fs): adapt to the new storage option and rename the package 2023-11-22 14:35:35 +01:00

@emigrate/storage-fs

A file system storage plugin for Emigrate, suitable for simple migration setups. To support containerized environments, it is recommended to use a database storage plugin instead.

Installation

Install the storage plugin in your project, alongside the Emigrate CLI:

npm install --save-dev @emigrate/cli @emigrate/storage-fs

Usage

Configure the storage in your emigrate.config.js file:

import storageFs from '@emigrate/storage-fs';

export default {
  directory: 'migrations',
  storage: storageFs({ filename: '.migrated.json' }),
};

Or use the CLI option --storage (or -s):

emigrate up --storage fs  # the @emigrate/storage- prefix is optional