<?php
$_db_migration_to = '41.10'; // 10.5.1
if (!isset($migrations) || !is_object($migrations))
	die("This file cannot be executed directly");
$migrations->CheckValid($_db_migration_to);
//===========================================================================================



$migrations->Run('001_create_captcha_api_keys_migration.php', <<<'DB_UPDATE_FILE'
<?php

/* @var $migrations \Claromentis\Setup\SetupFacade */

use Claromentis\Core\Integration\Repository;

$db = $migrations->GetDb();

$integration = new Repository($db);

$integration->CreateIfNotExist(
	'cloudflare_turnstile',
	'Cloudflare Turnstile CAPTCHA',
	['secret_key' => '', 'site_key' => ''],
	'Get your secret key at https://dash.cloudflare.com/?to=/:account/turnstile');

DB_UPDATE_FILE
);


//===========================================================================================
$migrations->SetVersion('41.10');
