Add url field to subscription

This commit is contained in:
ellite
2023-12-08 22:33:24 +01:00
parent 2d7fb4bb6d
commit f4da6b735e
10 changed files with 48 additions and 4 deletions
+12
View File
@@ -0,0 +1,12 @@
<?php
// This migration adds a URL column to the subscriptions table.
/** @noinspection PhpUndefinedVariableInspection */
$columnQuery = $db->query("SELECT * FROM pragma_table_info('subscriptions') where name='url'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec('ALTER TABLE subscriptions ADD COLUMN url VARCHAR(255);');
}
?>