<?php
declare(strict_types=1);

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

    if (!installHasColumn($pdo, 'email_layouts', 'editor_mode')) {
        installRunSqlFile($pdo, installRootPath() . '/install/sql/add_email_layout_builder_support.sql');
    }
};