<?php
declare(strict_types=1);

return static function (PDO $pdo): void {
    if (!installHasTable($pdo, 'lists')) {
        throw new RuntimeException('Tabelle lists fehlt.');
    }

    if (installHasColumn($pdo, 'lists', 'notify_on_signup')) {
        return;
    }

    installRunSqlFile($pdo, installRootPath() . '/install/sql/add_list_signup_notification.sql');
};