mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Faster initial database creation (#12297)
* Faster initial database creation Add db dumps to improve initial db migration On my test system 13s -> 7s, a 46% reduction. Should help out a lot on systems like RPi * lnms schema:dump command --snapshots saves db snapshots, otherwise it saves the yaml * fix style * fix timezones... * not working with in-memory db yet remove build.sql
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
$install_dir = realpath(__DIR__ . '/..');
|
||||
|
||||
// update.php will call init.php
|
||||
require $install_dir . '/includes/sql-schema/update.php';
|
||||
|
||||
$file = $install_dir . '/misc/db_schema.yaml';
|
||||
$yaml = Symfony\Component\Yaml\Yaml::dump(dump_db_schema(), 3, 2);
|
||||
|
||||
if (file_put_contents($file, $yaml)) {
|
||||
echo "Updated!\n";
|
||||
}
|
||||
Reference in New Issue
Block a user