1.4.32 • Published 11 months ago

directus-migrator v1.4.32

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

npm version code style: prettier

Directus Migrator

A Command-Line tool to simply migrate Directus Schemas,Roles and Permissions between different environments within your project

Table of contents

Warning

As of right now directus-migrator does not migrate from sqlite to postgress

Getting Started

These instructions will explain how to use the basic directus-migrator command and which arguments are required

Initilization

No installation neccessary. just run the following command from within the project root

npx directus-migrator -i

cli-init

directus-migrator.config.js

example

const config = {
  environments:[
    {
      "name": "development",
      "endpoint": "<development-url>",
      "accessToken": "<development_admin_token>"
    },
    {
      "name": "staging",
      "endpoint": "<staging-url>",
      "accessToken": "<staging_admin_token>"
    },
    {
      "name": "production",
      "endpoint": "<production-url>",
      "accessToken": "<production_admin_token>",
      "production":true
    },
  ]
}
export default config 

Usage

Basic

npx directus-migrator -s development -t production

Force Migration

If your environments are not on the exact same version of directus you may need to force the migration with the -force flag

npx directus-migrator -f -s development -t staging

API

Supported options

Options

npx directus-migrator --argument value

when adding boolean flags make sure to use --fullFlagName or -alias (eg. --init or -i)

NameTypeusageDescription
initboolean--init or -iInitialize config file
forceboolean--force or -fForce migration between directus versions
rolesboolean--roles or -rOnly migrates roles can be combined with permissions,schema,flows
permissionsboolean--permissions or -pOnly migrate permissions can be combined with roles,schema,flows
schemaboolean--schema or -cOnly migrate schema can be combined with roles,permissions,flows
flowsboolean--flows or -lOnly migrate flows can be combined with roles,permissions,schema
helpboolean--help or -hDisplay help menu
sourcestring--source envname or -s envnameEnvironment to migrate from
targetstring--target envname or -t envnameEnvironment to migrate to

Authors

CodingButter - Initial work - CodingButter

See also the list of contributors who participated in this project.

License

MIT License © CodingButter

1.4.24

11 months ago

1.4.26

11 months ago

1.4.25

11 months ago

1.4.28

11 months ago

1.4.27

11 months ago

1.4.29

11 months ago

1.4.31

11 months ago

1.4.30

11 months ago

1.4.32

11 months ago

1.4.22

11 months ago

1.4.23

11 months ago

1.4.21

1 year ago

1.2.0

1 year ago

1.4.6

1 year ago

1.2.8

1 year ago

1.4.5

1 year ago

1.2.7

1 year ago

1.0.9

1 year ago

1.2.6

1 year ago

1.0.8

1 year ago

1.4.3

1 year ago

1.2.5

1 year ago

1.0.7

1 year ago

1.4.2

1 year ago

1.0.6

1 year ago

1.2.3

1 year ago

1.0.5

1 year ago

1.2.2

1 year ago

1.0.4

1 year ago

1.2.1

1 year ago

1.0.3

1 year ago

1.4.20

1 year ago

1.3.8

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.9

1 year ago

1.3.6

1 year ago

1.1.8

1 year ago

1.3.5

1 year ago

1.1.7

1 year ago

1.3.4

1 year ago

1.1.6

1 year ago

1.3.3

1 year ago

1.1.5

1 year ago

1.3.2

1 year ago

1.1.4

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.1.2

1 year ago

1.4.9

1 year ago

1.4.8

1 year ago

1.4.10

1 year ago

1.4.7

1 year ago

1.2.9

1 year ago

1.4.13

1 year ago

1.4.12

1 year ago

1.4.15

1 year ago

1.4.14

1 year ago

1.4.16

1 year ago

1.4.19

1 year ago

1.4.18

1 year ago

1.0.2

1 year ago