feat: add email for notifications to household members
This commit is contained in:
@@ -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 ""');
|
||||
}
|
||||
Reference in New Issue
Block a user