migrations/Version20250526100847.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20250526100847 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $conn $this->connection;
  19.         $this->addSql("
  20.             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
  21.             ('tracking_enable', 1, 1, '0', 'tracking_enable', 'tracking_enable', 'Tracking & Analytics', 'CHECKBOX', '1', 0, 1, now(), now(), 'Enable Tracking and Page Analytics?', NULL, '', NULL);
  22.         ");
  23.         $this->addSql("
  24.             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
  25.             ('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);
  26.         ");
  27.         $this->addSql("
  28.             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
  29.             ('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);
  30.         ");
  31.         $this->addSql("
  32.             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
  33.             ('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);
  34.         ");
  35.         // TRACKING GEO LOCATION API CONFIG
  36.         $this->addSql("
  37.             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
  38.             ('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);
  39.         ");
  40.         $this->addSql("
  41.             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
  42.             ('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);
  43.         ");
  44.     }
  45.     public function down(Schema $schema): void
  46.     {
  47.         // this down() migration is auto-generated, please modify it to your needs
  48.         $this->addSql("
  49.             DELETE FROM `std_config` WHERE `machine_name` = 'tracking_enable';
  50.             DELETE FROM `std_config` WHERE `machine_name` = 'tracking_ask_precise_location';
  51.             DELETE FROM `std_config` WHERE `machine_name` = 'tracking_geoloc_api_endpoint';
  52.             DELETE FROM `std_config` WHERE `machine_name` = 'tracking_geoloc_api_secret';
  53.             "
  54.         );
  55.     }
  56. }