initial commit
This commit is contained in:
33
app/Console/Command/RestoreShell.php
Normal file
33
app/Console/Command/RestoreShell.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
|
||||
class RestoreShell extends AppShell
|
||||
{
|
||||
public $uses = array('AccessInfo', 'ExpiredRecord', 'Expense', 'ExpenseEmail', 'GroupExpense',
|
||||
'Participant', 'Meal', 'FamilyExpense', 'Log', 'GroupSetting', 'PermissionTable');
|
||||
|
||||
|
||||
public function main()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/*
|
||||
* Command: Console/cake Restore restoreSingleExpense
|
||||
* For restoring a single item
|
||||
*
|
||||
* This methods first tries to restore single expense from backup tables to live tables. If there
|
||||
* is no such expense in backup table, it tries to restore from archieve database to live database.
|
||||
* If the expense is already exist in live tables, it does not do anything.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function restoreSingleExpense()
|
||||
{
|
||||
$unique_url = "2ruQCFbb";
|
||||
$this->loadModel("Backup");
|
||||
$this->Backup->restore($unique_url);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user