Files
Wallos/migrations/000024.php
2025-07-21 22:53:35 +02:00

9 lines
378 B
PHP

<?php
// This migration adds a "cancellation_date" column to the subscriptions table.
$columnQuery = $db->query("SELECT * FROM pragma_table_info('subscriptions') where name='cancellation_date'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec('ALTER TABLE subscriptions ADD COLUMN cancellation_date DATE;');
}