"Default * theme (provided by default)..." in APP.yaml). Depends on * `RolesAndPermissionsSeed` for the primary Admin user id (`created_by` is a * NOT NULL FK on `frontend_themes`). */ declare(strict_types=1); use Phinx\Seed\AbstractSeed; final class DefaultThemesSeed extends AbstractSeed { public function getDependencies(): array { return [RolesAndPermissionsSeed::class]; } public function run(): void { $existing = $this->fetchRow( "SELECT id FROM frontend_themes WHERE name = 'SiteWeaver2026'", ); if ($existing !== false) { return; } $admin = $this->fetchRow('SELECT id FROM users ORDER BY id ASC LIMIT 1'); if ($admin === false) { // RolesAndPermissionsSeed should have already created the // primary Admin user; nothing to attribute this row to yet. return; } $this->table('frontend_themes')->insert([ 'name' => 'SiteWeaver2026', 'enabled' => true, 'created_at' => date('Y-m-d H:i:s'), 'created_by' => (int) $admin['id'], ])->saveData(); } }