Allow to disable notifications

This commit is contained in:
Sokratis
2024-02-23 15:29:11 +01:00
committed by GitHub
parent d2671b0276
commit 91e53a48e4
19 changed files with 79 additions and 9 deletions
+11
View File
@@ -0,0 +1,11 @@
<?php
// This migration adds a "activated" column to the subscriptions table and sets all values to true.
/** @noinspection PhpUndefinedVariableInspection */
$columnQuery = $db->query("SELECT * FROM pragma_table_info('subscriptions') WHERE name='inactive'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec('ALTER TABLE subscriptions ADD COLUMN inactive BOOLEAN DEFAULT false');
$db->exec('UPDATE subscriptions SET inactive = false');
}