Files
Wallos/migrations/000026.php
Miguel Ribeiro fed0192394 feat: select multiple filters on the dashboard
feat: add multi email recipients
feat: add option for also showing the original price on the dashboard
feat: open edit form after cloning subscription
fix: typo on export subscriptions to csv
chore: removed version line from docker-compose file
2024-09-01 22:19:06 +02:00

18 lines
797 B
PHP

<?php
// This migration adds a "other_emails" column to the email_notifications table.
// It also adds a "show_original_price" column to the settings table.
/** @noinspection PhpUndefinedVariableInspection */
$columnQuery = $db->query("SELECT * FROM pragma_table_info('email_notifications') where name='other_emails'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec('ALTER TABLE email_notifications ADD COLUMN other_emails TEXT DEFAULT "";');
}
$columnQuery = $db->query("SELECT * FROM pragma_table_info('settings') where name='show_original_price'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec('ALTER TABLE settings ADD COLUMN show_original_price BOOLEAN DEFAULT 0');
}