This commit is contained in:
@@ -54,4 +54,15 @@ function migrate($db) {
|
||||
$rootDb->exec("ALTER TABLE neptune.network_nodes ADD COLUMN IF NOT EXISTS notes VARCHAR(1000) DEFAULT '' AFTER group_name");
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
$db->exec("CREATE TABLE IF NOT EXISTS neptune_settings (
|
||||
setting_key VARCHAR(100) PRIMARY KEY,
|
||||
setting_value TEXT NOT NULL
|
||||
)");
|
||||
try {
|
||||
$stmt = $db->prepare("SELECT COUNT(*) as c FROM neptune_settings WHERE setting_key = 'registration_enabled'");
|
||||
$stmt->execute();
|
||||
if ($stmt->fetch()['c'] == 0) {
|
||||
$db->exec("INSERT INTO neptune_settings (setting_key, setting_value) VALUES ('registration_enabled', '1')");
|
||||
}
|
||||
} catch (Exception $e) {}
|
||||
}
|
||||
Reference in New Issue
Block a user