feat: option to hide disabled subscriptions (#286)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
Reference in New Issue
Block a user