Skip to content

Instantly share code, notes, and snippets.

@thelebster
Last active December 13, 2015 19:19
Show Gist options
  • Save thelebster/4962282 to your computer and use it in GitHub Desktop.
Save thelebster/4962282 to your computer and use it in GitHub Desktop.
#drupal #drush
#!/bin/bash
# 0 - no
# 1 - closed (read only)
# 2 - open (read/write)
# Disable comments for content of NODETYPE
drush vset --yes comment_NODETYPE 1
# Disable comments for the already created content of NODETYPE
# if you get an error, try removing the brackets {}
drush sqlq "update {node} set comment=1 where type='NODETYPE'"
drush sqlq "update {node_revision} set comment=1 where nid in (select nid from {node} where type='NODETYPE')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment