feat: add email for notifications to household members

This commit is contained in:
Miguel Ribeiro
2024-02-25 14:39:40 +01:00
committed by GitHub
parent f8defb663e
commit 26363dd5f3
16 changed files with 93 additions and 39 deletions
+11
View File
@@ -0,0 +1,11 @@
<?php
// This migration adds an "email" column to the members table.
// It allows the household member to receive notifications when their subscriptions are about to expire.
/** @noinspection PhpUndefinedVariableInspection */
$columnQuery = $db->query("SELECT * FROM pragma_table_info('household') where name='email'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec('ALTER TABLE household ADD COLUMN email TEXT DEFAULT ""');
}