Commit 1adbe559 by Junaid Rahman pv

Merge remote-tracking branch 'origin/development' into development

parents c1b3cfd2 64a9a39e
......@@ -82,9 +82,21 @@ class AppController extends Controller
$content = preg_replace_callback('/<generated_key>/', function () {
$length = 32;
$bytes = openssl_random_pseudo_bytes(32, $cryptoStrong);
return strtr(substr(base64_encode($bytes), 0, $length), '+/', '_-');
}, $content);
file_put_contents($file, $content);
}
}
public function actionDropDb()
{
$db = Yii::$app->db;
$db->createCommand("SET foreign_key_checks = 0;")->execute();
foreach ($db->schema->tableNames as $table) {
Console::output("Droping: {$table}");
$db->createCommand("DROP TABLE {$table}")->execute();
}
$db->createCommand("SET foreign_key_checks = 1;")->execute();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment