<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20250526100847 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$conn = $this->connection;
$this->addSql("
INSERT INTO `std_config` (`machine_name`, `created_by`, `updated_by`, `value`, `description_machine_name`, `details_machine_name`, `parent_name`, `variable_type`, `order_value`, `is_hidden`, `is_active`, `created_date`, `updated_date`, `label`, `content`, `language_code`, `roles`) VALUES
('tracking_enable', 1, 1, '0', 'tracking_enable', 'tracking_enable', 'Tracking & Analytics', 'CHECKBOX', '1', 0, 1, now(), now(), 'Enable Tracking and Page Analytics?', NULL, '', NULL);
");
$this->addSql("
INSERT INTO `std_config` (`machine_name`, `created_by`, `updated_by`, `value`, `description_machine_name`, `details_machine_name`, `parent_name`, `variable_type`, `order_value`, `is_hidden`, `is_active`, `created_date`, `updated_date`, `label`, `content`, `language_code`, `roles`) VALUES
('tracking_ask_precise_location', 1, 1, '0', 'tracking_ask_precise_location', 'tracking_ask_precise_location', 'Tracking & Analytics', 'CHECKBOX', '2', 0, 1, now(), now(), 'Ask precise location of the user?', NULL, '', NULL);
");
$this->addSql("
INSERT INTO `std_config` (`machine_name`, `created_by`, `updated_by`, `value`, `description_machine_name`, `details_machine_name`, `parent_name`, `variable_type`, `order_value`, `is_hidden`, `is_active`, `created_date`, `updated_date`, `label`, `content`, `language_code`, `roles`) VALUES
('tracking_precise_location_hours', 1, 1, '168', 'tracking_precise_location_hours', 'tracking_precise_location_hours', 'Tracking & Analytics', 'INPUT', '3', 0, 1, now(), now(), 'Update precise location after (hours):', NULL, '', NULL);
");
$this->addSql("
INSERT INTO `std_config` (`machine_name`, `created_by`, `updated_by`, `value`, `description_machine_name`, `details_machine_name`, `parent_name`, `variable_type`, `order_value`, `is_hidden`, `is_active`, `created_date`, `updated_date`, `label`, `content`, `language_code`, `roles`) VALUES
('tracking_same_page_min_interval_seconds', 1, 1, '300', 'tracking_same_page_min_interval_seconds', 'tracking_same_page_min_interval_seconds', 'Tracking & Analytics', 'INPUT', '4', 0, 1, now(), now(), 'Minimum time (in seconds) between tracked visits to the same page by the same fingerprint:', NULL, '', NULL);
");
// TRACKING GEO LOCATION API CONFIG
$this->addSql("
INSERT INTO `std_config` (`machine_name`, `created_by`, `updated_by`, `value`, `description_machine_name`, `details_machine_name`, `parent_name`, `variable_type`, `order_value`, `is_hidden`, `is_active`, `created_date`, `updated_date`, `label`, `content`, `language_code`, `roles`) VALUES
('tracking_geoloc_api_endpoint', 1, 1, NULL, 'tracking_ip_geoloc_api_endpoint', 'tracking_geoloc_api_endpoint', 'Tracking & Analytics', 'INPUT', '5', 0, 1, now(), now(), 'Geo Location Endpoint:', NULL, '', NULL);
");
$this->addSql("
INSERT INTO `std_config` (`machine_name`, `created_by`, `updated_by`, `value`, `description_machine_name`, `details_machine_name`, `parent_name`, `variable_type`, `order_value`, `is_hidden`, `is_active`, `created_date`, `updated_date`, `label`, `content`, `language_code`, `roles`) VALUES
('tracking_geoloc_api_secret', 1, 1, NULL, 'tracking_ip_geoloc_api_secret', 'tracking_geoloc_api_secret', 'Tracking & Analytics', 'INPUT', '6', 0, 1, now(), now(), 'Geo Location Secret Key:', NULL, '', NULL);
");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql("
DELETE FROM `std_config` WHERE `machine_name` = 'tracking_enable';
DELETE FROM `std_config` WHERE `machine_name` = 'tracking_ask_precise_location';
DELETE FROM `std_config` WHERE `machine_name` = 'tracking_geoloc_api_endpoint';
DELETE FROM `std_config` WHERE `machine_name` = 'tracking_geoloc_api_secret';
"
);
}
}