Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing data from other structr instance results in FrameworkException #585

Open
preske87 opened this issue Oct 17, 2022 · 1 comment
Open

Comments

@preske87
Copy link

I did create a data export in my production instance of Structr and am trying now to import this into my development instance.

For the import, I am using the API /maintenance/deployData/.

Structr version is 5.3-SNAPSHOT.

Within the target instance, I do get the following errors

Unable to import nodes for type Group
FrameworkException(422): Unable to commit transaction, validation failed ErrorTokens: Group.name already_taken d0d041dfffb5426cbadbd071dd4a48e2. Existing uuid: 829797c7edf642f6943c7dd2e9c1ce69
Unable to import nodes for type SchemaGrant
FrameworkException(422): Unable to commit transaction, validation failed ErrorTokens: SchemaGrant already_taken d0796c60aa834a188cdbf4d49a629057
Unable to import nodes for type SchemaNode
FrameworkException(422): Unable to commit transaction, validation failed ErrorTokens: SchemaNode.name already_taken 96796183edb546fcb5bae837e0b700a5. Existing uuid: d1ef8ee09d8840c5a5d07c0ac5e63f9f
Unable to import nodes for type SchemaRelationshipNode
FrameworkException(422): Unable to commit transaction, validation failed ErrorTokens: SchemaRelationshipNode.sourceNode must_not_be_empty, SchemaRelationshipNode.targetNode must_not_be_empty

Prior the data import, I did a schema import through /maintenance/deploy/ which went all fine.

How can I accomodate those errors?

@preske87 preske87 changed the title Importing data from other structr instance results in FraemworkException Importing data from other structr instance results in FrameworkException Oct 17, 2022
@vigorouscoding
Copy link
Member

From the looks of these messages, the set of exported types contains built-in types. This is only in rare cases necessary.

These built-in schema nodes/grants/relationships are all included in the regular deployment export and should already be present after a deployment import.

Users already raise a warning, that this can lead to problems (usually if the currently logged in user is in the data deployment import).
Exporting groups probably results in a huge export folder with relationships (which should already be created by regular deployment).

The recommended way for User/Group types is the file pre-deploy.conf (see https://docs.structr.com/docs/fundamental-concepts#pre-deployconf )

Grants/Schema nodes should not be present in the data deployment.

Data deployment is mostly meant for custom types and currently has some caveats (Files/Folders are not supported).

Does that answer the question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants