NAME

TaskPipe::Tool::Command_ClearTables - command to clear tables

PURPOSE

A convenience function for clearing a group of tables in the database.

DESCRIPTION

The clear tables command is intended for use in early development when mistakes are frequent and it is desirable to run plans over an empty database each time. The default behaviour is to clear only the cache tables. You can clear only plan tables by specifying --group=plan or both cache and plan tables (ie the whole project) using --group=project. Note that clearing all tables in the project would mean e.g. any source tables you were using would also be emptied. Be careful! The default is set for a reason...

It is also possible to clear global tables (instead of project specific tables) by specifying --scope=global (if you do so, the --group parameter will be ignored). However, this should not normally be necessary. Use with caution and only if you understand the consequences.

OPTIONS

group

Use group to identify which table group to clear. Note group only applies when --scope=project. If --scope=global then this option is meaningless and will be ignored. Valid groups are cache, plan and project. project will clear both cache and plan groups (ie, all project related tables.)

  • cache - clear only the project tables taskpipe uses for caching

  • plan - clear the tables specific to your project without affecting the cache

  • project - clear all project tables (both cache and plan)

tables

A comma delimited list of table names to clear. The list should be a subset of the tables in --group. If --tables is omitted, all tables that match --group will be cleared

scope

Specify project to clear cache and/or plan tables (use in conjunction with group) - or global to clear global tables (use with caution)

AUTHOR

Tom Gracey <tomgracey@gmail.com>

COPYRIGHT AND LICENSE

Copyright (c) Tom Gracey 2018

TaskPipe is free software, licensed under

The GNU Public License Version 3