GraphCMS Migration Helper makes it easy to generate and run GraphCMS migrations.
GraphCMS Migration Helper makes it easy to generate and run GraphCMS migrations.
```
% npm install -g graphcms-migration-helper
``
% gmh generate
% gmh generate
% gmh generate
The following migration template will be created.
`js
const { newMigration } = require('@graphcms/management');
const migration = newMigration({
endpoint: process.env.GRAPHCMS_ENDPOINT,
authToken: process.env.GRAPHCMS_TOKEN,
name: 'YYYYMMDDHHmmssSSS-
});
// Write your migration
module.exports = {
migration,
};
`
Migration file will be created in directory named graphcms-migrations as default.
```
% gmh migrate
% gmh migrate