feat: option to hide disabled subscriptions (#286)

This commit is contained in:
Miguel Ribeiro
2024-04-20 14:58:46 +02:00
committed by GitHub
parent 27f84ff3d5
commit b80ab4bdc6
23 changed files with 83 additions and 4 deletions
+11
View File
@@ -0,0 +1,11 @@
<?php
// This migration adds a "hide_disabled" column to the settings table and sets to false as default.
/** @noinspection PhpUndefinedVariableInspection */
$columnQuery = $db->query("SELECT * FROM pragma_table_info('settings') where name='hide_disabled'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec("ALTER TABLE settings ADD COLUMN hide_disabled BOOLEAN DEFAULT 0");
$db->exec('UPDATE settings SET `hide_disabled` = 0');
}