It would be great to include drush support. Will attach a patch with a simple start.

Comments

markdorison’s picture

StatusFileSize
new1.56 KB

Initial drush integration with support for bulk generation of missing UUIDs.

markdorison’s picture

Status: Active » Needs review
markdorison’s picture

Just to clarify, this patch contains support for a drush command, uuid-create-missing, which will "Create missing UUIDs for node types specified for automatic generation."

apotek’s picture

Nice. Suggestion would be to implement a simple param, like so

drush uuid-create-missing [type]

where the first param typed would be the content type for which you want to create missing items.

This might be a bit node-centric though.

Another approach would be to use

drush uuid-create-missing --types=content_type1,content_type2

but I think the former is better.1

Not sure how to accomodate the user and taxonomy create stuff, but this would be a start.

Plus one on this.

markdorison’s picture

StatusFileSize
new2.56 KB

@apotek: Thanks for the suggestion. I went ahead and implemented the form:

drush uuid-create-missing [type1] [type2] ...

I also validate that each of the types specified are marked for automatic UUID creation in the UUID settings. If any one of them is not, I have drush abort.

todd nienkerk’s picture

Removing the spam tag.

ericduran’s picture

Status: Needs review » Reviewed & tested by the community

Applies cleanly and Works like a charm.

One thing that I found weird is that when you pass a content type is still creates the missing uuid for the users and taxonomy terms. But that's actually not an issue with this patch but the way the uuid module uuid_sync function is written.

The drush command works and the filtering per content type also works. Nice and Simple.

recidive’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Commited to 6.x-1.x, thanks!

This should now be ported to 7.x. Patches welcome.

skwashd’s picture

Status: Patch (to be ported) » Fixed

Ported. See r129fc5e. Please open a new issue for any problems related to this functionality.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.