mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Added demo recreation handling
This commit is contained in:
@@ -65,4 +65,12 @@ class GrocyDemoDataGenerator
|
||||
GrocyLogicHabits::TrackHabit(2, date('Y-m-d H:i:s', strtotime('-20 days')));
|
||||
}
|
||||
}
|
||||
|
||||
public static function RecreateDemo()
|
||||
{
|
||||
unlink(__DIR__ . '/data/grocy.db');
|
||||
|
||||
$db = Grocy::GetDbConnectionRaw(true);
|
||||
self::PopulateDemoData($db);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user