Files
Wallos/migrations/000037.php
Miguel Ribeiro 0fef9597ef fix: null array on empty subscription list
fix: don't use mbstring
feat: sort graphs on the statistics page by usage
feat: lifetime subscriptions
feat: allow multiple filters on the settings page
feat: filter by notification status
fix: migrations using double quotes
feat: rework icons
fix: open 3 dot menu abone for the subscriptions at the bottom
fix: ntfy notifications with strange chars
2026-05-17 00:54:14 +02:00

17 lines
618 B
PHP

<?php
// This migration adds "firstname" and "lastname" columns to the user table
$columnQuery = $db->query("SELECT * FROM pragma_table_info('user') where name='firstname'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec("ALTER TABLE user ADD COLUMN firstname TEXT DEFAULT ''");
}
$columnQuery = $db->query("SELECT * FROM pragma_table_info('user') where name='lastname'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec("ALTER TABLE user ADD COLUMN lastname TEXT DEFAULT ''");
}