emigrate/packages/storage-fs
2024-06-27 15:38:50 +02:00
..
src feat(types): move Emigrate types to separate package and improve types (#41) 2023-12-15 13:03:35 +01:00
CHANGELOG.md chore(release): version packages 2024-05-30 10:16:07 +02:00
package.json chore(release): version packages 2024-05-30 10:16:07 +02:00
README.md docs: include Deno usage instructions in the documentation 2023-12-19 15:40:05 +01:00
tsconfig.json chore(deps): upgrade TypeScript to v5.5 and enable isolatedDeclarations 2024-06-27 15:38:50 +02: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 @emigrate/cli @emigrate/storage-fs
# or
pnpm add @emigrate/cli @emigrate/storage-fs
# or
yarn add @emigrate/cli @emigrate/storage-fs
# or
bun add @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