keyboardcowboy/drush-truncate

Drush 命令,用于截断一个或多个表。

1.0.0 2017-08-04 17:04 UTC

This package is not auto-updated.

Last update: 2024-09-12 01:17:02 UTC


README

简单的 drush 工具,用于截断数据库表。

截断单个表

$ drush truncate watchdog
Found 1 tables matching watchdog on yourdb.
watchdog
Truncate 1 table on yourdb? (y/n):

截断多个表

# Use an asterisk as a wildcard.
$ drush truncate cache_entity_*
Found 5 tables matching cache_entity_* on yourdb.
cache_entity_comment
cache_entity_node
cache_entity_taxonomy_term
cache_entity_taxonomy_vocabulary
cache_entity_user
Truncate 5 tables on yourdb? (y/n):

交互模式允许您进行选择。

$ drush truncate --interactive cache_entity_*
Found 5 tables matching cache_entity_* on yourdb.
Truncate yourdb.cache_entity_comment? (y/n): n
Skipped yourdb.cache_entity_comment.
Truncate yourdb.cache_entity_node? (y/n): y
Truncated yourdb.cache_entity_node.
Truncate yourdb.cache_entity_taxonomy_term? (y/n):