Pennebaker / craftcms-thearchitect

CraftCMS plugin to generate content models from JSON data.
MIT License
171 stars 9 forks source link

Call an Import via URL. #22

Closed blendimc closed 7 years ago

blendimc commented 7 years ago

Just found your plugin and it's exactly thing thing I was hoping for. I have for a long time wanted to get away from the updating the db manually to add a field, section etc.

One use case I have for this plugin is to store a file in the content folder and have that file "run" on every single deploy to both check for changes as well as ensure that if their were any database changes they are reset. I was wondering if there was a way to craft a URL so that way you could pass a specific file name to a request to the plugin such that you could script the checking of that file upon every import? Obviously this is something that needs to be checked via permissions and I'm not sure how/if that's possible from a CURL call but thought I'd ask. Maybe allow a Token to be generated that could be stored privately that'd allow the import.

Thanks again.

spAnser commented 7 years ago

This will probably fall under our migrations when that happens.

We are discussing things on how we want this to work and hopefully do it in an automated way.

Our migrations will also hopefully update existing fields that get modified as long as the handle and type did not change. Changing the type generally causes loss of data. So I think that wont be part of the automated adding/updating of fields.

spAnser commented 7 years ago

This feature is currently implemented in the develop branch. It however does not allow you to specify which file it runs. It will use the _master_.json file which is the file created by the migrations feature.

blendimc commented 7 years ago

Wonderful! Will check it out