我在Fortrabbit上创建了一个应用,并为我的应用购买了一个服务。我推出了我的一些应用(Laravel)并创建了我的数据库。现在我想重置我的应用,怎么做呢?有人能帮忙吗?
这个答案来自forrabbit Support:
sorry, it's not possible to reset the git repo (for now).
But you can push new code any time. You can also delete files when you ssh into you App.
If you want to start form the scratch, I suggest to spin up a new App.
这是我自己使用laravel 4在Fortrabbit中刷新完整DB的脚本
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');