I created app on Fortrabbit and purchased a service for my app. I pushed some my app (Laravel) and created my database. Now I want to reset my app. How can I do that? Could somebody help?
Reset my app on Fortrabbit
308 Views Asked by PKa At
2
There are 2 best solutions below
0

This is the script I use myself using laravel 4 to flush a complete DB in Fortrabbit
DB::statement('SET FOREIGN_KEY_CHECKS=0');
$tables= DB::select('SHOW TABLES;');
foreach ($tables as $table) {
foreach ($table as $key=>$tableName) {
$tables= DB::statement("DROP TABLE $tableName;");
}
}
DB::statement('SET FOREIGN_KEY_CHECKS=1');
This answer is from Fortrabbit Support: