0.1.1 • Published 2 years ago

graphcms-migration-helper v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

GraphCMS Migration Helper

GraphCMS Migration Helper makes it easy to generate and run GraphCMS migrations.

Install

% npm install -g graphcms-migration-helper

Usege

Generate Migration

% gmh generate <Migration Name>
% gmh generate <Migration Name> -o <Out Directory Path>
% gmh generate <Migration Name> --out <Out Directory Path>

The following migration template will be created.

const { newMigration } = require('@graphcms/management');

const migration = newMigration({
  endpoint: process.env.GRAPHCMS_ENDPOINT,
  authToken: process.env.GRAPHCMS_TOKEN,
  name: 'YYYYMMDDHHmmssSSS-<Migration Name>',
});

// Write your migration

module.exports = {
  migration,
};

Migration file will be created in directory named graphcms-migrations as default.

Execute Migration

% gmh migrate <Migration File Path>
% gmh migrate <Migration File Path> --dry-run
0.1.1

2 years ago

0.1.1-6

2 years ago

0.1.1-5

2 years ago

0.1.1-4

2 years ago

0.1.1-3

2 years ago

0.1.1-2

2 years ago

0.1.1-1

2 years ago

0.1.1-0

2 years ago