Files
Wallos/migrations/000033.php
Miguel Ribeiro ff13fcb654 feat: option to show progress of subscription cycle
fix: currency symbol for monthly budget
feat: new api endpoint that returns the version
chore: fix typo on documentation
2025-01-12 00:55:12 +01:00

11 lines
556 B
PHP

<?php
// This migration adds a "show_subscription_progress" column to the settings table and sets to false as default.
/** @noinspection PhpUndefinedVariableInspection */
$columnQuery = $db->query("SELECT * FROM pragma_table_info('settings') where name='show_subscription_progress'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec("ALTER TABLE settings ADD COLUMN show_subscription_progress BOOLEAN DEFAULT 0");
$db->exec('UPDATE settings SET `show_subscription_progress` = 0');
}