mirror of
https://github.com/ellite/Wallos.git
synced 2026-04-17 21:50:11 -04:00
12 lines
429 B
PHP
12 lines
429 B
PHP
<?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);');
|
|
}
|
|
|
|
?>
|