@ohoareau/migrate
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

migrate

Usage

migrate up

const migrate = require('@ohoareau/migrate').default;
const alreadyDeployed = await myPersonalFunctionToRetrieveAlreadyDeployedDiffByFileNames();

await migrate('/my/dir/containing/diff/files', alreadyDeployed, myContext, 'up'); 

migrate down

const migrate = require('@ohoareau/migrate').default;
const alreadyDeployed = await myPersonalFunctionToRetrieveAlreadyDeployedDiffByFileNames();

await migrate('/my/dir/containing/diff/files', alreadyDeployed, myContext, 'down'); 

plan up

const { plan } = require('@ohoareau/migrate');
const alreadyDeployed = await myPersonalFunctionToRetrieveAlreadyDeployedDiffByFileNames();

const planned = await plan('/my/dir/containing/diff/files', alreadyDeployed, 'up'); // string[] 

plan down

const { plan } = require('@ohoareau/migrate');
const alreadyDeployed = await myPersonalFunctionToRetrieveAlreadyDeployedDiffByFileNames();

const planned = await plan('/my/dir/containing/diff/files', alreadyDeployed, 'down'); // string[] 

Readme

Keywords

none

Package Sidebar

Install

npm i @ohoareau/migrate

Weekly Downloads

21

Version

0.3.1

License

MIT

Unpacked Size

20.3 kB

Total Files

6

Last publish

Collaborators

  • ohoareau