. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Schema; use Fisharebest\Webtrees\DB; /** * Populate the default_resn table */ class SeedDefaultResnTable implements SeedInterface { private const array DEFAULT_RESTRICTIONS = [ 'SSN' => 'confidential', 'SOUR' => 'privacy', 'REPO' => 'privacy', 'SUBM' => 'confidential', 'SUBN' => 'confidential', ]; /** * Run the seeder. * * @return void */ public function run(): void { // Set default privacy settings for new trees foreach (self::DEFAULT_RESTRICTIONS as $tag_type => $resn) { DB::table('default_resn')->updateOrInsert([ 'gedcom_id' => -1, 'tag_type' => $tag_type, ], [ 'resn' => $resn, ]); } } }