feat(storage-fs): adapt to the new storage option and rename the package

This commit is contained in:
Joakim Carlstein 2023-11-22 11:25:05 +01:00
parent 8e87ade5c0
commit 7d8ac9b185
8 changed files with 52 additions and 41 deletions

View file

@ -0,0 +1,30 @@
# @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:
```bash
npm install --save-dev @emigrate/cli @emigrate/storage-fs
```
## Usage
Configure the storage in your `emigrate.config.js` file:
```js
import storageFs from '@emigrate/storage-fs';
export default {
directory: 'migrations',
storage: storageFs({ filename: '.migrated.json' }),
};
```
Or use the CLI option `--storage` (or `-s`):
```bash
emigrate up --storage fs # the @emigrate/storage- prefix is optional
```