Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Cannot set managed to true #240

Closed
rijkvanzanten opened this issue Jul 8, 2018 · 4 comments
Closed

Cannot set managed to true #240

rijkvanzanten opened this issue Jul 8, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@rijkvanzanten
Copy link
Member

We cannot delete records in directus_collections through the API. DELETE to /collections not only deletes the row in directus_collections, but it also deletes the full collection in the database (by design!). This makes it impossible to use just the existence of the row in directus_collections as a managed state. To make it work, we should instead use a dedicated managed flag column in directus_collections

@rijkvanzanten rijkvanzanten added the enhancement New feature or request label Jul 8, 2018
@wellingguzman
Copy link
Contributor

I believe it will be better to create a new endpoint to stop managing a collection instead adding a new field to the table.

If we do that, we should do the same to the directus_fields table.

@benhaynes
Copy link
Member

  1. The nice thing about having a flag is that if you setup a collection, and then "unmanage" it... we still have all the setup info in case you want to turn it on again. BUT, I'm fine with your approach is @rijkvanzanten agrees.

  2. Remember, Fields can not be unmanaged. Only collections. All you can do is HIDE fields (which we can already do).

@rijkvanzanten
Copy link
Member Author

Managed collections and hidden fields are basically the same IMO. We use a hidden column for fields, so we should also use a managed column for collections. That’s my two cents 😄

@rijkvanzanten
Copy link
Member Author

We cannot PATCH an unmanaged collection to be managed again. PATCHing { managed: true } results in "Collection "<collection>" is not being managed by Directus" error

@rijkvanzanten rijkvanzanten added bug Something isn't working and removed enhancement New feature or request labels Jul 23, 2018
@rijkvanzanten rijkvanzanten changed the title Add managed column to directus_collections Cannot set managed to true Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants