mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
show defaults
This commit is contained in:
parent
b4f0440a8f
commit
0efc0b4da0
@ -90,24 +90,28 @@ const options = {
|
||||
|
||||
#### versionStrategy
|
||||
|
||||
The following versionStrategy values may be used:
|
||||
The following `versionStrategy` values may be used:
|
||||
|
||||
"ignore" - allow transfer between any versions of Strapi
|
||||
"exact" - require an exact version match (including tags such as -alpha and -beta)
|
||||
"major" - require only the semver major version to match (but allow minor, patch, and tag to differ)
|
||||
"minor" - require only the semver major and minor versions to match (but allow patch to differ)
|
||||
"patch" - require only the semver major, minor, and patch version to match (but allow tag differences such as -alpha and -beta)
|
||||
`'ignore'` - allow transfer between any versions of Strapi
|
||||
`'exact'` - require an exact version match (including tags such as -alpha and -beta)
|
||||
`'major'` - require only the semver major version to match (but allow minor, patch, and tag to differ)
|
||||
`'minor'` - require only the semver major and minor versions to match (but allow patch to differ)
|
||||
`'patch'` - require only the semver major, minor, and patch version to match (but allow tag differences such as -alpha and -beta)
|
||||
|
||||
The default `versionStrategy` used when one is not provided is `'ignore'`.
|
||||
|
||||
#### schemaStrategy
|
||||
|
||||
The follow schemaStrategy values may be used:
|
||||
The follow `schemaStrategy` values may be used:
|
||||
|
||||
"ignore" - bypass schema validation (transfer will attempt to run but throw errors on incompatible data type inserts)
|
||||
"strict" - disallow mismatches that are expected to cause errors in the transfer, but allow certain non-data fields in the schema to differ
|
||||
"exact" - schema must be identical with no changes
|
||||
`'ignore'` - bypass schema validation (transfer will attempt to run but throw errors on incompatible data type inserts)
|
||||
`'strict'` - disallow mismatches that are expected to cause errors in the transfer, but allow certain non-data fields in the schema to differ
|
||||
`'exact'` - schema must be identical with no changes
|
||||
|
||||
Note: The "strict" schema strategy is defined as "anything expected to cause errors in the transfer" and is the default method for the import, export, and transfer CLI commands. Therefore, the technical functionality will always be subject to change. If you need to find the definition for the current version of Strapi, see `packages/core/data-transfer/src/engine/validation/schemas/index.ts`
|
||||
|
||||
The default `schemaStrategy` used when one is not provided is `'strict'`.
|
||||
|
||||
##### Handling Schema differences
|
||||
|
||||
When a schema diff is discovered with a given schemaStrategy, an error is throw. However, before throwing the error the engine checks to see if there are any schema diff handlers set via `engine.onSchemaDiff(handler)` which allows errors to be bypassed (for example, by prompting the user if they wish to proceed).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user