migrations/Version20250709135626.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 Version20250709135626 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.         $this->addSql('CREATE TABLE std_geo_map (id INT UNSIGNED AUTO_INCREMENT NOT NULL COMMENT \'Role unique identifier\', municipality VARCHAR(255) NOT NULL COMMENT \'Role name\', municipality_code INT NOT NULL COMMENT \'Role name\', type VARCHAR(255) NOT NULL COMMENT \'Role name\', district VARCHAR(255) NOT NULL COMMENT \'Role name\', district_code INT NOT NULL COMMENT \'Role name\', geo_point_2d JSON DEFAULT NULL COMMENT \'Geographical point in 2D (longitude, latitude)\', geo_shape GEOMETRY DEFAULT NULL COMMENT \'Geographical shape data\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  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.             ('use_api_for_tracking', 1, 1, '0', 'use_api_for_tracking', 'use_api_for_tracking', 'Tracking & Analytics', 'CHECKBOX', '2', 0, 1, now(), now(), 'Use API for Tracking', 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.             ('use_geo_map_for_tracking', 1, 1, '0', 'use_geo_map_for_tracking', 'use_geo_map_for_tracking', 'Tracking & Analytics', 'CHECKBOX', '2', 0, 1, now(), now(), 'Use Geo Map for Tracking', NULL, '', NULL);
  26.         ");
  27.     }
  28.     public function down(Schema $schema): void
  29.     {
  30.         // this down() migration is auto-generated, please modify it to your needs
  31.         $this->addSql('DROP TABLE std_geo_map');
  32.     }
  33. }