insulin/cli — pull request #52 by jcsmorais (2014-02-03 18:31:44+00:00)
Title: Create Repair and Rebuild command

Implement this command like we had on 1.0 version.

```bash
insulin help core-quick-repair
Repairs and rebuilds DB, Extensions, Vardefs, Sugar Dashlets etc..
Examples:
insulin core-quick-repair Repairs and rebuilds DB, Extensions, Vardefs, Sugar Dashlets etc..
insulin core-quick-repair --clearVardefs Repairs and rebuilds Vardefs for all modules.
insulin core-quick-repair --modules=Account --clearVardefs Repairs and rebuilds Vardefs for Account module.
Options:
--modules A comma delimited list of module names, or bean names.
--clearTpls Clear Smarty templates from cache.
--clearJsFiles Clear Javascript files.
--clearDashlets Clear Sugar Dashlet files.
--clearThemeCache Clear Theme Cache.
--clearVardefs Clear Vardefs from cache.
--clearJsLangFiles Clear Javascript Language files from cache.
--execute Automatically applies changes between database and vardefs.
--clearSearchCache Clear Unified Search Cache.
--clearPDFFontCache Clear PDF Font Cache File.
--rebuildAuditTables Rebuild Audit Tables.
--clearAll Clear all of the above (default).
--rebuildExtensions Rebuild Extensions.
--repairDatabase Syncs Database tables with vardefs.
--repairRoles Repairs Roles.
Aliases: repair
```

```bash
insulin core-quick-repair
Repair and Rebuild successfully. [success]
Changes found between database and vardefs, what do you want to do?
[0] : Cancel
[1] : Print changes
[2] : Apply all changes
[3] : Apply changes one by one
1
ALTER TABLE leads add column do_not_call bool DEFAULT '0' NULL , add column birthdate date NULL;
ALTER TABLE accounts add column skype varchar(100) NULL;
What do you want to do?
[0] : Cancel
[1] : Apply all changes
[2] : Apply changes one by one
1
Database changes applied.
```