--
-- Host: localhost    Database: stevedb
-- ------------------------------------------------------


--
-- Table structure for table `address`
--

CREATE TABLE `address` (
  `address_pk` int NOT NULL AUTO_INCREMENT,
  `street` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `house_number` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `zip_code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `city` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `country` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `latitude` decimal(11,8) DEFAULT NULL,
  `longitude` decimal(11,8) DEFAULT NULL,
  PRIMARY KEY (`address_pk`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `address`
--


--
-- Table structure for table `certificate`
--

CREATE TABLE `certificate` (
  `certificate_id` int NOT NULL AUTO_INCREMENT,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `serial_number` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `issuer_name` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `subject_name` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `organization_name` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `common_name` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `key_size` int DEFAULT NULL,
  `valid_from` timestamp NULL DEFAULT NULL,
  `valid_to` timestamp NULL DEFAULT NULL,
  `signature_algorithm` enum('RSA','ECDSA') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `certificate_chain_pem` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`certificate_id`),
  KEY `idx_serial_number` (`serial_number`),
  KEY `idx_created_at` (`created_at`),
  KEY `idx_valid_from` (`valid_from`),
  KEY `idx_valid_to` (`valid_to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `certificate`
--


--
-- Table structure for table `charge_box`
--

CREATE TABLE `charge_box` (
  `charge_box_pk` int NOT NULL AUTO_INCREMENT,
  `charge_box_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `endpoint_address` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ocpp_protocol` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `registration_status` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'Accepted',
  `charge_point_vendor` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `charge_point_model` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `charge_point_serial_number` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `charge_box_serial_number` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `fw_version` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `fw_update_status` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `fw_update_timestamp` timestamp(6) NULL DEFAULT NULL,
  `iccid` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `imsi` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `meter_type` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `meter_serial_number` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `diagnostics_status` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `diagnostics_timestamp` timestamp(6) NULL DEFAULT NULL,
  `last_heartbeat_timestamp` timestamp(6) NULL DEFAULT NULL,
  `description` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `note` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `address_pk` int DEFAULT NULL,
  `admin_address` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `insert_connector_status_after_transaction_msg` tinyint(1) DEFAULT '1',
  `charge_box_instant_power` int NOT NULL DEFAULT '0',
  `charge_box_instant_power_horodatage` timestamp NULL DEFAULT NULL,
  `charge_box_place_gauche_prise` int NOT NULL DEFAULT '0',
  `charge_box_place_droite_prise` int NOT NULL DEFAULT '0',
  `charge_box_place_gauche_prise_horodatage` datetime DEFAULT NULL,
  `charge_box_place_droite_prise_horodatage` datetime DEFAULT NULL,
  `security_profile` int DEFAULT '0',
  `auth_password` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `cpo_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`charge_box_pk`),
  UNIQUE KEY `chargeBoxId_UNIQUE` (`charge_box_id`),
  KEY `chargebox_op_ep_idx` (`ocpp_protocol`,`endpoint_address`),
  KEY `FK_charge_box_address_apk` (`address_pk`),
  CONSTRAINT `FK_charge_box_address_apk` FOREIGN KEY (`address_pk`) REFERENCES `address` (`address_pk`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `charge_box`
--

INSERT INTO `charge_box` VALUES (14,'ZEUS_B2_APOLLON',NULL,'ocpp1.6J','Accepted','Schneider Electric','EVlink Smart Wallbox','3N182241311B2S1B755170001','EVB1A22P4ERI182441404','3.4.0.7',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2026-03-04 21:59:19.876000',NULL,NULL,NULL,NULL,1,0,NULL,0,0,NULL,NULL,0,NULL,NULL),(15,'ZEUS_B3_APHRODITE',NULL,'ocpp1.6J','Accepted',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2026-03-04 21:59:11.816000',NULL,NULL,NULL,NULL,1,0,NULL,0,0,NULL,NULL,0,NULL,NULL),(16,'ZEUS_B4_ARTEMIS',NULL,'ocpp1.6J','Accepted',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2026-03-04 21:59:22.766000',NULL,NULL,NULL,NULL,1,0,NULL,0,0,NULL,NULL,0,NULL,NULL),(17,'ZEUS_B1_ATHENA',NULL,'ocpp1.6J','Accepted','Schneider Electric','EVlink Smart Wallbox','3N182241311F2S1B755170001','EVB1A22P4ERI182441003','3.4.0.7',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2026-03-04 21:59:24.896000',NULL,NULL,NULL,NULL,1,0,NULL,0,0,'2026-03-04 22:54:19','2026-03-04 22:54:20',0,NULL,NULL),(18,'ZEUS_B9_HADES',NULL,'ocpp1.6J','Accepted','Schneider Electric','EVlink Smart Wallbox','3N203030391C2S1B755170001','EVB1A22P4RI3N203352200102','3.3.0.17',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2026-03-04 17:56:39.725000',NULL,NULL,NULL,NULL,0,0,NULL,0,0,NULL,NULL,0,NULL,NULL);

--
-- Table structure for table `charge_box_certificate_installed`
--

CREATE TABLE `charge_box_certificate_installed` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `charge_box_pk` int NOT NULL,
  `responded_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `certificate_type` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `hash_algorithm` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `issuer_name_hash` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `issuer_key_hash` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `serial_number` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_charge_box_pk` (`charge_box_pk`),
  KEY `idx_certificate_type` (`certificate_type`),
  CONSTRAINT `charge_box_certificate_installed_ibfk_1` FOREIGN KEY (`charge_box_pk`) REFERENCES `charge_box` (`charge_box_pk`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `charge_box_certificate_installed`
--


--
-- Table structure for table `charge_box_certificate_signed`
--

CREATE TABLE `charge_box_certificate_signed` (
  `certificate_id` int NOT NULL,
  `charge_box_pk` int NOT NULL,
  `accepted` tinyint(1) NOT NULL,
  `responded_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  KEY `certificate_id` (`certificate_id`),
  KEY `charge_box_pk` (`charge_box_pk`),
  CONSTRAINT `charge_box_certificate_signed_ibfk_1` FOREIGN KEY (`certificate_id`) REFERENCES `certificate` (`certificate_id`) ON DELETE CASCADE,
  CONSTRAINT `charge_box_certificate_signed_ibfk_2` FOREIGN KEY (`charge_box_pk`) REFERENCES `charge_box` (`charge_box_pk`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `charge_box_certificate_signed`
--


--
-- Temporary view structure for view `charge_box_certificate_signed_view`
--

/*!50001 DROP VIEW IF EXISTS `charge_box_certificate_signed_view`*/;
/*!50001 CREATE VIEW `charge_box_certificate_signed_view` AS SELECT 
 1 AS `certificate_id`,
 1 AS `created_at`,
 1 AS `serial_number`,
 1 AS `issuer_name`,
 1 AS `subject_name`,
 1 AS `organization_name`,
 1 AS `common_name`,
 1 AS `key_size`,
 1 AS `valid_from`,
 1 AS `valid_to`,
 1 AS `signature_algorithm`,
 1 AS `certificate_chain_pem`,
 1 AS `charge_box_id`,
 1 AS `charge_box_pk`,
 1 AS `accepted`,
 1 AS `responded_at`*/;

--
-- Table structure for table `charge_box_firmware_update_event`
--

CREATE TABLE `charge_box_firmware_update_event` (
  `job_id` int DEFAULT NULL,
  `charge_box_pk` int NOT NULL,
  `event_status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `event_timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  KEY `idx_job_id` (`job_id`),
  KEY `idx_charge_box_pk` (`charge_box_pk`),
  KEY `idx_event_status` (`event_status`),
  KEY `idx_event_timestamp` (`event_timestamp`),
  CONSTRAINT `charge_box_firmware_update_event_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `charge_box_firmware_update_job` (`job_id`) ON DELETE CASCADE,
  CONSTRAINT `charge_box_firmware_update_event_ibfk_2` FOREIGN KEY (`charge_box_pk`) REFERENCES `charge_box` (`charge_box_pk`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `charge_box_firmware_update_event`
--


--
-- Table structure for table `charge_box_firmware_update_job`
--

CREATE TABLE `charge_box_firmware_update_job` (
  `job_id` int NOT NULL AUTO_INCREMENT,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `firmware_location` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `retrieve_datetime` timestamp NULL DEFAULT NULL,
  `install_datetime` timestamp NULL DEFAULT NULL,
  `signing_certificate` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `signature` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  PRIMARY KEY (`job_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `charge_box_firmware_update_job`
--


--
-- Table structure for table `charge_box_log_upload_event`
--

CREATE TABLE `charge_box_log_upload_event` (
  `job_id` int DEFAULT NULL,
  `charge_box_pk` int NOT NULL,
  `event_status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `event_timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  KEY `idx_job_id` (`job_id`),
  KEY `idx_charge_box_pk` (`charge_box_pk`),
  KEY `idx_event_status` (`event_status`),
  KEY `idx_event_timestamp` (`event_timestamp`),
  CONSTRAINT `charge_box_log_upload_event_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `charge_box_log_upload_job` (`job_id`) ON DELETE CASCADE,
  CONSTRAINT `charge_box_log_upload_event_ibfk_2` FOREIGN KEY (`charge_box_pk`) REFERENCES `charge_box` (`charge_box_pk`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `charge_box_log_upload_event`
--


--
-- Table structure for table `charge_box_log_upload_job`
--

CREATE TABLE `charge_box_log_upload_job` (
  `job_id` int NOT NULL AUTO_INCREMENT,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `log_type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remote_location` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `oldest_timestamp` timestamp NULL DEFAULT NULL,
  `latest_timestamp` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`job_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `charge_box_log_upload_job`
--


--
-- Table structure for table `charge_box_security_event`
--

CREATE TABLE `charge_box_security_event` (
  `charge_box_pk` int NOT NULL,
  `type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `timestamp` timestamp NOT NULL,
  `tech_info` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `event_timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  KEY `idx_charge_box_pk` (`charge_box_pk`),
  KEY `idx_type` (`type`),
  KEY `idx_timestamp` (`timestamp`),
  CONSTRAINT `charge_box_security_event_ibfk_1` FOREIGN KEY (`charge_box_pk`) REFERENCES `charge_box` (`charge_box_pk`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `charge_box_security_event`
--


--
-- Temporary view structure for view `charge_box_status_event`
--

/*!50001 DROP VIEW IF EXISTS `charge_box_status_event`*/;
/*!50001 CREATE VIEW `charge_box_status_event` AS SELECT 
 1 AS `job_id`,
 1 AS `charge_box_pk`,
 1 AS `event_status`,
 1 AS `event_timestamp`,
 1 AS `event_type`*/;

--
-- Table structure for table `charging_profile`
--

CREATE TABLE `charging_profile` (
  `charging_profile_pk` int NOT NULL AUTO_INCREMENT,
  `stack_level` int NOT NULL,
  `charging_profile_purpose` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `charging_profile_kind` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `recurrency_kind` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `valid_from` timestamp(6) NULL DEFAULT NULL,
  `valid_to` timestamp(6) NULL DEFAULT NULL,
  `duration_in_seconds` int DEFAULT NULL,
  `start_schedule` timestamp(6) NULL DEFAULT NULL,
  `charging_rate_unit` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `min_charging_rate` decimal(15,1) DEFAULT NULL,
  `description` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `note` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  PRIMARY KEY (`charging_profile_pk`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `charging_profile`
--

INSERT INTO `charging_profile` VALUES (1,1,'ChargePointMaxProfile','Absolute',NULL,'2025-03-16 00:00:00.000000',NULL,NULL,NULL,'W',7000.0,'everyone 7 kW',NULL),(2,11,'TxDefaultProfile','Recurring','Daily','2025-05-04 00:00:00.000000',NULL,86400,'2025-05-05 00:00:00.000000','W',1.0,'Limite de 7kW sur une borne',NULL);

--
-- Table structure for table `charging_schedule_period`
--

CREATE TABLE `charging_schedule_period` (
  `charging_profile_pk` int NOT NULL,
  `start_period_in_seconds` int NOT NULL,
  `power_limit` decimal(15,1) NOT NULL,
  `number_phases` int DEFAULT NULL,
  UNIQUE KEY `UQ_charging_schedule_period` (`charging_profile_pk`,`start_period_in_seconds`),
  CONSTRAINT `FK_charging_schedule_period_charging_profile_pk` FOREIGN KEY (`charging_profile_pk`) REFERENCES `charging_profile` (`charging_profile_pk`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `charging_schedule_period`
--

INSERT INTO `charging_schedule_period` VALUES (1,0,7000.0,1),(2,0,7000.0,3);

--
-- Table structure for table `connector`
--

CREATE TABLE `connector` (
  `connector_pk` int unsigned NOT NULL AUTO_INCREMENT,
  `charge_box_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `connector_id` int NOT NULL,
  PRIMARY KEY (`connector_pk`),
  UNIQUE KEY `connector_pk_UNIQUE` (`connector_pk`),
  UNIQUE KEY `connector_cbid_cid_UNIQUE` (`charge_box_id`,`connector_id`),
  CONSTRAINT `FK_connector_charge_box_cbid` FOREIGN KEY (`charge_box_id`) REFERENCES `charge_box` (`charge_box_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=24845 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `connector`
--

INSERT INTO `connector` VALUES (24547,'ZEUS_B1_ATHENA',1),(24544,'ZEUS_B2_APOLLON',1),(24545,'ZEUS_B3_APHRODITE',1),(24546,'ZEUS_B4_ARTEMIS',1),(24784,'ZEUS_B9_HADES',1);

--
-- Table structure for table `connector_charging_profile`
--

CREATE TABLE `connector_charging_profile` (
  `connector_pk` int unsigned NOT NULL,
  `charging_profile_pk` int NOT NULL,
  UNIQUE KEY `UQ_connector_charging_profile` (`connector_pk`,`charging_profile_pk`),
  KEY `FK_connector_charging_profile_charging_profile_pk` (`charging_profile_pk`),
  CONSTRAINT `FK_connector_charging_profile_charging_profile_pk` FOREIGN KEY (`charging_profile_pk`) REFERENCES `charging_profile` (`charging_profile_pk`),
  CONSTRAINT `FK_connector_charging_profile_connector_pk` FOREIGN KEY (`connector_pk`) REFERENCES `connector` (`connector_pk`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `connector_charging_profile`
--


--
-- Table structure for table `connector_meter_value`
--

CREATE TABLE `connector_meter_value` (
  `connector_pk` int unsigned NOT NULL,
  `transaction_pk` int unsigned DEFAULT NULL,
  `value_timestamp` timestamp(6) NULL DEFAULT NULL,
  `value` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `reading_context` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `format` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `measurand` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `location` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `unit` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `phase` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  KEY `FK_cm_pk_idx` (`connector_pk`),
  KEY `FK_tid_cm_idx` (`transaction_pk`),
  KEY `cmv_value_timestamp_idx` (`value_timestamp`),
  CONSTRAINT `FK_pk_cm` FOREIGN KEY (`connector_pk`) REFERENCES `connector` (`connector_pk`) ON DELETE CASCADE,
  CONSTRAINT `FK_tid_cm` FOREIGN KEY (`transaction_pk`) REFERENCES `transaction_start` (`transaction_pk`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `connector_meter_value`
--

INSERT INTO `connector_meter_value` VALUES (24546,959,'2026-03-02 07:16:47.000000','1696',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 07:31:47.000000','3412',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 07:46:47.000000','5127',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 08:01:47.000000','6840',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 08:16:47.000000','8554',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 08:31:47.000000','10267',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 08:46:47.000000','11981',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 09:01:47.000000','13693',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 09:16:47.000000','15406',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 09:31:47.000000','17119',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 09:46:47.000000','18830',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 10:01:47.000000','20546',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 10:16:47.000000','22260',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 10:31:47.000000','23889',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 10:46:47.000000','24871',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 11:01:47.000000','25465',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 11:16:47.000000','25766',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 11:31:47.000000','25766',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 11:46:47.000000','25766',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 12:01:47.000000','25766',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 12:16:47.000000','25766',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 12:31:47.000000','25766',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 12:46:47.000000','25766',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 13:01:47.000000','25766',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 13:16:47.000000','25766',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 13:31:47.000000','25766',NULL,NULL,NULL,NULL,NULL,NULL),(24546,959,'2026-03-02 13:46:47.000000','25766',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 07:26:26.000000','1701',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 07:41:26.000000','3426',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 07:56:26.000000','5147',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 08:11:26.000000','6867',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 08:26:26.000000','8508',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 08:41:26.000000','9194',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 08:56:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 09:11:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 09:26:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 09:41:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 09:56:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 10:11:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 10:26:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 10:41:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 10:56:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 11:11:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 11:26:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 11:41:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 11:56:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 12:11:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 12:26:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 12:41:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 12:56:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 13:11:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 13:26:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24545,960,'2026-03-02 13:41:26.000000','9223',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 07:31:31.000000','1711',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 07:46:31.000000','3446',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 08:01:32.000000','5175',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 08:16:32.000000','6908',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 08:31:32.000000','8641',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 08:46:32.000000','10374',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 09:01:32.000000','12106',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 09:16:32.000000','13836',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 09:31:32.000000','15568',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 09:46:32.000000','17300',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 10:01:32.000000','19030',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 10:16:32.000000','20759',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 10:31:33.000000','22490',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 10:46:33.000000','24221',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 11:01:33.000000','25954',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 11:16:33.000000','27686',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 11:31:33.000000','29416',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 11:46:33.000000','31145',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 12:01:33.000000','32878',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 12:16:33.000000','34066',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 12:31:33.000000','34672',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 12:46:34.000000','34916',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 13:01:34.000000','34916',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 13:16:34.000000','34916',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 13:31:34.000000','34916',NULL,NULL,NULL,NULL,NULL,NULL),(24544,962,'2026-03-02 13:46:35.000000','34916',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 07:06:32.000000','1774',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 07:21:32.000000','3559',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 07:36:32.000000','5345',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 07:51:32.000000','7132',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 08:06:32.000000','8918',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 08:21:32.000000','10705',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 08:36:32.000000','12492',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 08:51:33.000000','14279',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 09:06:33.000000','16065',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 09:21:33.000000','17853',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 09:36:33.000000','19640',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 09:51:33.000000','21427',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 10:06:33.000000','23213',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 10:21:33.000000','25000',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 10:36:33.000000','26786',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 10:51:33.000000','28572',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 11:06:33.000000','30360',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 11:21:34.000000','32148',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 11:36:34.000000','33936',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 11:51:34.000000','35724',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 12:06:34.000000','37514',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 12:21:34.000000','39302',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 12:36:34.000000','41091',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 12:51:34.000000','42879',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 13:06:34.000000','44667',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 13:21:34.000000','46455',NULL,NULL,NULL,NULL,NULL,NULL),(24547,963,'2026-03-02 13:36:35.000000','48242',NULL,NULL,NULL,NULL,NULL,NULL),(24545,961,'2026-03-02 14:11:25.000000','1685',NULL,NULL,NULL,NULL,NULL,NULL),(24545,961,'2026-03-02 14:26:25.000000','3389',NULL,NULL,NULL,NULL,NULL,NULL),(24545,961,'2026-03-02 14:41:25.000000','5089',NULL,NULL,NULL,NULL,NULL,NULL),(24545,961,'2026-03-02 14:56:25.000000','6793',NULL,NULL,NULL,NULL,NULL,NULL),(24545,961,'2026-03-02 15:11:25.000000','8494',NULL,NULL,NULL,NULL,NULL,NULL),(24545,961,'2026-03-02 15:26:25.000000','10193',NULL,NULL,NULL,NULL,NULL,NULL),(24545,961,'2026-03-02 15:41:25.000000','11893',NULL,NULL,NULL,NULL,NULL,NULL),(24545,961,'2026-03-02 15:56:25.000000','13593',NULL,NULL,NULL,NULL,NULL,NULL),(24544,964,'2026-03-02 16:02:44.000000','1683',NULL,NULL,NULL,NULL,NULL,NULL),(24545,961,'2026-03-02 16:11:25.000000','15294',NULL,NULL,NULL,NULL,NULL,NULL),(24544,964,'2026-03-02 16:17:44.000000','3392',NULL,NULL,NULL,NULL,NULL,NULL),(24545,961,'2026-03-02 16:26:25.000000','16996',NULL,NULL,NULL,NULL,NULL,NULL),(24544,964,'2026-03-02 16:32:44.000000','5095',NULL,NULL,NULL,NULL,NULL,NULL),(24545,961,'2026-03-02 16:41:25.000000','18699',NULL,NULL,NULL,NULL,NULL,NULL),(24544,964,'2026-03-02 16:47:44.000000','6797',NULL,NULL,NULL,NULL,NULL,NULL),(24544,964,'2026-03-02 17:02:45.000000','8490',NULL,NULL,NULL,NULL,NULL,NULL),(24544,964,'2026-03-02 17:17:45.000000','10169',NULL,NULL,NULL,NULL,NULL,NULL),(24544,964,'2026-03-02 17:32:45.000000','11854',NULL,NULL,NULL,NULL,NULL,NULL),(24544,964,'2026-03-02 17:47:45.000000','13533',NULL,NULL,NULL,NULL,NULL,NULL),(24544,964,'2026-03-02 18:02:45.000000','15208',NULL,NULL,NULL,NULL,NULL,NULL),(24544,964,'2026-03-02 18:17:45.000000','16881',NULL,NULL,NULL,NULL,NULL,NULL),(24544,964,'2026-03-02 18:32:45.000000','18554',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 07:05:00.000000','1780',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 07:08:02.000000','1744',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 07:20:00.000000','3582',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 07:23:02.000000','3508',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 07:35:00.000000','5389',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 07:38:02.000000','5267',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 07:50:00.000000','7205',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 07:52:16.000000','1796',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 07:53:02.000000','7010',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 08:04:26.000000','1777',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 08:05:00.000000','8151',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 08:07:15.000000','3615',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 08:08:02.000000','8725',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 08:19:26.000000','3581',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 08:20:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 08:22:15.000000','5445',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 08:23:02.000000','9601',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 08:34:26.000000','5394',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 08:35:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 08:37:16.000000','7256',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 08:38:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 08:49:26.000000','7206',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 08:50:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 08:52:16.000000','9064',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 08:53:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 09:04:27.000000','9017',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 09:05:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 09:07:16.000000','10869',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 09:08:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 09:19:27.000000','10828',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 09:20:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 09:22:16.000000','12673',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 09:23:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 09:34:27.000000','12640',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 09:35:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 09:37:16.000000','14475',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 09:38:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 09:49:27.000000','14448',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 09:50:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 09:52:16.000000','16277',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 09:53:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 10:04:27.000000','16253',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 10:05:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 10:07:16.000000','18078',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 10:08:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 10:19:27.000000','18062',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 10:20:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 10:22:16.000000','19879',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 10:23:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 10:34:27.000000','19869',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 10:35:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 10:37:17.000000','21679',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 10:38:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 10:49:27.000000','21678',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 10:50:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 10:52:17.000000','23478',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 10:53:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 11:04:27.000000','23487',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 11:05:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 11:07:17.000000','25277',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 11:08:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 11:19:28.000000','25293',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 11:20:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 11:22:17.000000','27075',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 11:23:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 11:34:28.000000','27098',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 11:35:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 11:37:17.000000','28552',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 11:38:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24547,968,'2026-03-03 11:49:28.000000','28902',NULL,NULL,NULL,NULL,NULL,NULL),(24546,965,'2026-03-03 11:50:00.000000','8748',NULL,NULL,NULL,NULL,NULL,NULL),(24544,967,'2026-03-03 11:52:17.000000','28681',NULL,NULL,NULL,NULL,NULL,NULL),(24545,966,'2026-03-03 11:53:02.000000','10194',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 07:29:45.000000','1711',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 07:43:21.000000','1726',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 07:44:45.000000','3448',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 07:58:22.000000','3469',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 07:59:45.000000','5184',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 08:11:06.000000','1776',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 08:13:22.000000','5213',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 08:14:45.000000','6921',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 08:26:06.000000','3561',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 08:28:22.000000','6959',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 08:29:45.000000','8655',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 08:41:06.000000','5357',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 08:43:22.000000','8705',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 08:44:45.000000','10388',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 08:56:06.000000','7149',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 08:58:22.000000','10449',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 08:59:45.000000','12123',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 09:11:07.000000','8937',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 09:13:22.000000','12192',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 09:14:45.000000','13856',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 09:26:07.000000','10729',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 09:28:22.000000','13935',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 09:29:45.000000','15589',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 09:41:07.000000','12517',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 09:43:23.000000','15677',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 09:44:45.000000','17320',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 09:56:07.000000','14301',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 09:58:23.000000','17420',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 09:59:45.000000','19052',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 10:11:07.000000','16087',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 10:13:23.000000','19163',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 10:14:45.000000','20782',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 10:26:07.000000','17872',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 10:28:23.000000','20905',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 10:29:45.000000','22514',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 10:41:07.000000','19658',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 10:43:23.000000','22475',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 10:44:45.000000','24248',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 10:56:07.000000','21363',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 10:58:24.000000','23553',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 10:59:45.000000','25980',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 11:11:08.000000','21614',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 11:13:23.000000','23553',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 11:14:45.000000','27712',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 11:26:08.000000','21614',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 11:28:23.000000','23553',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 11:29:45.000000','29446',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 11:41:08.000000','21614',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 11:43:24.000000','23553',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 11:44:45.000000','31179',NULL,NULL,NULL,NULL,NULL,NULL),(24544,971,'2026-03-04 11:56:08.000000','21614',NULL,NULL,NULL,NULL,NULL,NULL),(24547,970,'2026-03-04 11:58:24.000000','23553',NULL,NULL,NULL,NULL,NULL,NULL),(24546,969,'2026-03-04 11:59:45.000000','32911',NULL,NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `connector_status`
--

CREATE TABLE `connector_status` (
  `connector_pk` int unsigned NOT NULL,
  `status_timestamp` timestamp(6) NULL DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `error_code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `error_info` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `vendor_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `vendor_error_code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  KEY `FK_cs_pk_idx` (`connector_pk`),
  KEY `connector_status_cpk_st_idx` (`connector_pk`,`status_timestamp`),
  CONSTRAINT `FK_cs_pk` FOREIGN KEY (`connector_pk`) REFERENCES `connector` (`connector_pk`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `connector_status`
--

INSERT INTO `connector_status` VALUES (24544,'2026-03-02 13:38:30.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24545,'2026-03-02 13:39:24.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24546,'2026-03-02 13:39:33.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24547,'2026-03-02 13:39:39.000000','Charging','NoError',NULL,NULL,NULL),(24546,'2026-03-02 07:01:47.000000','Charging','NoError',NULL,NULL,NULL),(24546,'2026-03-02 13:47:18.000000','Available','NoError',NULL,NULL,NULL),(24546,'2026-03-02 13:47:18.000000','Finishing','NoError',NULL,NULL,NULL),(24547,'2026-03-02 13:48:24.000000','Finishing','NoError',NULL,NULL,NULL),(24544,'2026-03-02 13:48:48.000000','Finishing','NoError',NULL,NULL,NULL),(24545,'2026-03-02 13:48:58.000000','Finishing','NoError',NULL,NULL,NULL),(24545,'2026-03-02 07:11:25.000000','Charging','NoError',NULL,NULL,NULL),(24545,'2026-03-02 13:48:58.000000','Available','NoError',NULL,NULL,NULL),(24545,'2026-03-02 13:56:15.000000','Available','NoError',NULL,NULL,NULL),(24545,'2026-03-02 13:56:19.000000','Preparing','NoError','EVconnected',NULL,NULL),(24545,'2026-03-02 13:56:25.000000','Charging','NoError',NULL,NULL,NULL),(24545,'2026-03-02 13:56:25.000000','SuspendedEVSE','NoError',NULL,NULL,NULL),(24545,'2026-03-02 13:56:30.000000','Charging','NoError',NULL,NULL,NULL),(24544,'2026-03-02 07:16:31.000000','Charging','NoError',NULL,NULL,NULL),(24544,'2026-03-02 13:48:48.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-02 06:51:32.000000','Charging','NoError',NULL,NULL,NULL),(24547,'2026-03-02 13:48:24.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-02 15:46:44.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-02 15:46:46.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-02 15:47:27.000000','Preparing','NoError','EVconnected',NULL,NULL),(24544,'2026-03-02 15:47:41.000000','Preparing','NoError','EVconnected',NULL,NULL),(24544,'2026-03-02 15:47:44.000000','Charging','NoError',NULL,NULL,NULL),(24544,'2026-03-02 15:47:44.000000','SuspendedEVSE','NoError',NULL,NULL,NULL),(24544,'2026-03-02 15:47:56.000000','Charging','NoError',NULL,NULL,NULL),(24546,'2026-03-02 16:26:26.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-02 16:40:53.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-02 16:40:55.000000','Available','NoError',NULL,NULL,NULL),(24545,'2026-03-02 16:52:52.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24545,'2026-03-02 16:52:54.000000','Available','NoError',NULL,NULL,NULL),(24545,'2026-03-02 16:52:56.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-02 18:38:36.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-02 18:38:38.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-03 04:45:40.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-03 04:45:56.000000','Available','NoError',NULL,NULL,NULL),(24546,'2026-03-03 06:09:19.000000','Preparing','NoError',NULL,NULL,NULL),(24546,'2026-03-03 06:09:45.000000','Available','NoError',NULL,NULL,NULL),(24546,'2026-03-03 06:49:21.000000','Preparing','NoError',NULL,NULL,NULL),(24546,'2026-03-03 06:50:00.000000','Charging','NoError',NULL,NULL,NULL),(24546,'2026-03-03 06:50:02.000000','Charging','NoError',NULL,NULL,NULL),(24545,'2026-03-03 06:52:11.000000','Preparing','NoError','EVconnected',NULL,NULL),(24545,'2026-03-03 06:53:02.000000','Charging','NoError',NULL,NULL,NULL),(24545,'2026-03-03 06:53:03.000000','Charging','NoError',NULL,NULL,NULL),(24544,'2026-03-03 07:37:09.000000','Preparing','NoError','EVconnected',NULL,NULL),(24544,'2026-03-03 07:37:12.000000','Preparing','NoError','EVconnected',NULL,NULL),(24544,'2026-03-03 07:37:16.000000','Charging','NoError',NULL,NULL,NULL),(24544,'2026-03-03 07:37:16.000000','Charging','NoError',NULL,NULL,NULL),(24547,'2026-03-03 07:49:18.000000','Preparing','NoError','EVconnected',NULL,NULL),(24547,'2026-03-03 07:49:22.000000','Preparing','NoError','EVconnected',NULL,NULL),(24547,'2026-03-03 07:49:26.000000','Charging','NoError',NULL,NULL,NULL),(24547,'2026-03-03 07:49:27.000000','Charging','NoError',NULL,NULL,NULL),(24546,'2026-03-03 08:16:33.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24545,'2026-03-03 08:35:06.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24544,'2026-03-03 11:39:20.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24547,'2026-03-03 12:00:04.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-03 12:00:04.000000','Finishing','NoError',NULL,NULL,NULL),(24544,'2026-03-03 12:00:08.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-03 12:00:08.000000','Finishing','NoError',NULL,NULL,NULL),(24545,'2026-03-03 12:00:12.000000','Available','NoError',NULL,NULL,NULL),(24545,'2026-03-03 12:00:12.000000','Finishing','NoError',NULL,NULL,NULL),(24546,'2026-03-03 12:00:16.000000','Available','NoError',NULL,NULL,NULL),(24546,'2026-03-03 12:00:16.000000','Finishing','NoError',NULL,NULL,NULL),(24546,'2026-03-03 14:31:41.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-03 16:46:46.000000','Available','NoError',NULL,NULL,NULL),(24545,'2026-03-03 16:49:01.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-03 17:38:33.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-03 18:00:35.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-03 18:00:47.000000','Available','NoError',NULL,NULL,NULL),(24546,'2026-03-04 07:14:45.000000','Charging','NoError',NULL,NULL,NULL),(24546,'2026-03-04 07:15:35.000000','Charging','NoError',NULL,NULL,NULL),(24547,'2026-03-04 07:15:37.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-04 07:15:49.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-04 07:28:12.000000','Preparing','NoError','EVconnected',NULL,NULL),(24547,'2026-03-04 07:28:18.000000','Preparing','NoError','EVconnected',NULL,NULL),(24547,'2026-03-04 07:28:22.000000','Charging','NoError',NULL,NULL,NULL),(24547,'2026-03-04 07:28:22.000000','SuspendedEVSE','NoError',NULL,NULL,NULL),(24547,'2026-03-04 07:28:25.000000','Charging','NoError',NULL,NULL,NULL),(24544,'2026-03-04 07:55:59.000000','Preparing','NoError','EVconnected',NULL,NULL),(24544,'2026-03-04 07:56:03.000000','Preparing','NoError','EVconnected',NULL,NULL),(24544,'2026-03-04 07:56:06.000000','Charging','NoError',NULL,NULL,NULL),(24544,'2026-03-04 07:56:07.000000','Charging','NoError',NULL,NULL,NULL),(24547,'2026-03-04 10:56:18.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24544,'2026-03-04 11:00:23.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24547,'2026-03-04 12:00:04.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-04 12:00:04.000000','Finishing','NoError',NULL,NULL,NULL),(24544,'2026-03-04 12:00:08.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-04 12:00:08.000000','Finishing','NoError',NULL,NULL,NULL),(24546,'2026-03-04 12:00:12.000000','Available','NoError',NULL,NULL,NULL),(24546,'2026-03-04 12:00:12.000000','Finishing','NoError',NULL,NULL,NULL),(24784,'2026-02-25 14:30:49.000000','Available','NoError',NULL,NULL,NULL),(24784,'2026-03-04 14:00:03.000000','Preparing','NoError',NULL,NULL,NULL),(24784,'2026-03-04 14:00:33.000000','Available','NoError',NULL,NULL,NULL),(24784,'2026-03-04 14:27:26.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-04 15:48:02.000000','Finishing','NoError',NULL,NULL,NULL),(24544,'2026-03-04 15:48:06.000000','Finishing','NoError',NULL,NULL,NULL),(24544,'2026-03-04 15:48:09.000000','Available','NoError',NULL,NULL,NULL),(24784,'2026-03-04 15:51:07.000000','Available','NoError',NULL,NULL,NULL),(24546,'2026-03-04 16:07:19.000000','Available','NoError',NULL,NULL,NULL),(24784,'2026-03-04 16:21:05.000000','Available','NoError',NULL,NULL,NULL),(24784,'2026-03-04 16:41:35.000000','Preparing','NoError','EVconnected',NULL,NULL),(24784,'2026-03-04 16:41:42.000000','Faulted','OtherError','Energy Reserve',NULL,'25'),(24784,'2026-03-04 16:41:50.000000','Unavailable','ConnectorLockFailure','Outlet_Lock',NULL,'4'),(24784,'2026-03-04 16:42:49.000000','Faulted','OtherError','[Un]Plug_Process',NULL,'14'),(24784,'2026-03-04 16:42:56.000000','Available','NoError',NULL,NULL,NULL),(24784,'2026-03-04 16:42:58.000000','Preparing','NoError','EVconnected',NULL,NULL),(24784,'2026-03-04 16:43:11.000000','Faulted','OtherError','Energy Reserve',NULL,'25'),(24784,'2026-03-04 16:43:20.000000','Charging','NoError',NULL,NULL,NULL),(24784,'2026-03-04 16:43:51.000000','Finishing','NoError',NULL,NULL,NULL),(24784,'2026-03-04 16:43:56.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-04 17:26:58.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-04 17:27:40.000000','Preparing','NoError',NULL,NULL,NULL),(24544,'2026-03-04 17:28:11.000000','Available','NoError',NULL,NULL,NULL),(24784,'2026-03-04 17:50:13.000000','Available','NoError',NULL,NULL,NULL),(24784,'2026-03-04 17:51:20.000000','Preparing','NoError','EVconnected',NULL,NULL),(24784,'2026-03-04 17:54:52.000000','Charging','NoError',NULL,NULL,NULL),(24784,'2026-03-04 17:55:18.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24784,'2026-03-04 17:55:36.000000','Available','NoError',NULL,NULL,NULL),(24784,'2026-03-04 17:57:19.000000','Preparing','NoError','EVconnected',NULL,NULL),(24784,'2026-03-04 17:57:29.000000','Charging','NoError',NULL,NULL,NULL),(24784,'2026-03-04 17:57:47.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24784,'2026-03-04 17:58:02.000000','Available','NoError',NULL,NULL,NULL),(24784,'2026-03-04 17:58:59.000000','Preparing','NoError','EVconnected',NULL,NULL),(24784,'2026-03-04 17:59:09.000000','Charging','NoError',NULL,NULL,NULL),(24784,'2026-03-04 17:59:25.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-04 18:11:04.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-04 18:11:34.000000','Preparing','NoError','EVconnected',NULL,NULL),(24547,'2026-03-04 18:11:54.000000','Preparing','NoError','EVconnected',NULL,NULL),(24547,'2026-03-04 18:11:58.000000','Charging','NoError',NULL,NULL,NULL),(24547,'2026-03-04 18:11:58.000000','SuspendedEVSE','NoError',NULL,NULL,NULL),(24547,'2026-03-04 18:12:18.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-04 18:12:19.000000','Available','NoError',NULL,NULL,NULL),(24545,'2026-03-04 18:44:05.000000','Preparing','NoError','EVconnected',NULL,NULL),(24545,'2026-03-04 18:44:24.000000','Faulted','OtherError','Energy Reserve',NULL,'25'),(24545,'2026-03-04 18:44:32.000000','Unavailable','ConnectorLockFailure','Outlet_Lock',NULL,'4'),(24545,'2026-03-04 18:44:36.000000','Available','NoError',NULL,NULL,NULL),(24545,'2026-03-04 18:44:52.000000','Preparing','NoError','EVconnected',NULL,NULL),(24545,'2026-03-04 18:45:01.000000','Faulted','OtherError','Energy Reserve',NULL,'25'),(24545,'2026-03-04 18:45:09.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-04 18:45:47.000000','Preparing','NoError','EVconnected',NULL,NULL),(24544,'2026-03-04 18:45:50.000000','Preparing','NoError','EVconnected',NULL,NULL),(24544,'2026-03-04 18:45:54.000000','Charging','NoError',NULL,NULL,NULL),(24544,'2026-03-04 18:45:54.000000','SuspendedEVSE','NoError',NULL,NULL,NULL),(24544,'2026-03-04 18:46:00.000000','Charging','NoError',NULL,NULL,NULL),(24544,'2026-03-04 18:55:08.000000','SuspendedEV','NoError',NULL,NULL,NULL),(24544,'2026-03-04 18:55:14.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-04 18:55:15.000000','Available','NoError',NULL,NULL,NULL),(24544,'2026-03-04 20:30:16.000000','Available','NoError',NULL,NULL,NULL),(24547,'2026-03-04 20:30:21.000000','Available','NoError',NULL,NULL,NULL);

--
-- Table structure for table `ocpp_tag`
--

CREATE TABLE `ocpp_tag` (
  `ocpp_tag_pk` int NOT NULL AUTO_INCREMENT,
  `id_tag` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `parent_id_tag` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `expiry_date` timestamp(6) NULL DEFAULT NULL,
  `max_active_transaction_count` int NOT NULL DEFAULT '1',
  `note` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `badge_affecte` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`ocpp_tag_pk`),
  UNIQUE KEY `idTag_UNIQUE` (`id_tag`),
  KEY `user_expiryDate_idx` (`expiry_date`),
  KEY `FK_ocpp_tag_parent_id_tag` (`parent_id_tag`),
  CONSTRAINT `FK_ocpp_tag_parent_id_tag` FOREIGN KEY (`parent_id_tag`) REFERENCES `ocpp_tag` (`id_tag`)
) ENGINE=InnoDB AUTO_INCREMENT=1031 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `ocpp_tag`
--

INSERT INTO `ocpp_tag` VALUES (1,'5443ACF7',NULL,NULL,10,'Breno Mobilize noir',0),(4,'049163E2DE0F90',NULL,NULL,1,'Breno Badge',0),(6,'CDEDD16B',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(9,'FE8E80AF',NULL,'2026-12-31 23:59:00.000000',1,'Affecté',1),(51,'4E79B4AF',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(52,'3E5F02A2',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(53,'FEF0B0AF',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(54,'ADF1956B',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(56,'4E9943AF',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(57,'B7FE35B5',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(58,'B40C90FE',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(59,'FCE31A2E',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(60,'F3AE0D1D',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(61,'A44AAF59',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(62,'3E8E4BAF',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(63,'EB0BD119',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(64,'A41FEAFE',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(65,'DB931D1A',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(66,'8EB54FAF',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(67,'F460D1A9',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(68,'4EC115A2',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(77,'3AB575A6',NULL,NULL,1,'Badge Noir Charles',0),(84,'048B8F72CC2B80',NULL,NULL,1,'Badge Renault de Charles',0),(87,'4C2E1D2E',NULL,NULL,10,'Badge bleu marqué ZEUS du Lab',0),(110,'AD6EBB3C',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(111,'9D65C03C',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(112,'A350A11D',NULL,'2026-12-31 23:59:00.000000',1,'Affecté',1),(113,'ED37E26B',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(114,'BB110C1A',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(116,'F497BAA9',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(117,'A4B1C059',NULL,NULL,1,NULL,0),(118,'F43F71A9',NULL,'2026-12-31 23:59:00.000000',1,'Affecté',1),(119,'945458CE',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(120,'FBB5F719',NULL,'2026-12-31 23:59:59.000000',1,NULL,1),(396,'1C496FA1',NULL,NULL,1,NULL,0),(435,'ABD2D319',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(436,'F21B8594',NULL,'2026-12-31 23:59:59.000000',1,NULL,1),(437,'ACC96B72',NULL,'2026-12-31 23:59:59.000000',1,NULL,1),(492,'2C0E7072',NULL,'2026-12-31 23:59:59.000000',1,NULL,1),(525,'50B0A4B5',NULL,'2026-12-31 23:59:00.000000',1,NULL,1),(601,'9DFA686B',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(602,'AEB75CAF',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(603,'9EB573AF',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(641,'DCA511CB',NULL,'2026-12-31 23:59:00.000000',1,'Affecté',1),(642,'D4963DA9',NULL,'2026-12-31 23:59:59.000000',1,NULL,1),(643,'EB02C019',NULL,'2026-12-31 23:59:59.000000',1,'Affecté',1),(854,'EDF0CD3C',NULL,NULL,1,'Badge de Charles',0),(875,'DCAE919B',NULL,NULL,1,'Didier',0);

--
-- Temporary view structure for view `ocpp_tag_activity`
--

/*!50001 DROP VIEW IF EXISTS `ocpp_tag_activity`*/;
/*!50001 CREATE VIEW `ocpp_tag_activity` AS SELECT 
 1 AS `ocpp_tag_pk`,
 1 AS `id_tag`,
 1 AS `parent_id_tag`,
 1 AS `expiry_date`,
 1 AS `max_active_transaction_count`,
 1 AS `note`,
 1 AS `active_transaction_count`,
 1 AS `in_transaction`,
 1 AS `blocked`*/;

--
-- Table structure for table `reservation`
--

CREATE TABLE `reservation` (
  `reservation_pk` int unsigned NOT NULL AUTO_INCREMENT,
  `connector_pk` int unsigned NOT NULL,
  `transaction_pk` int unsigned DEFAULT NULL,
  `id_tag` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `start_datetime` datetime DEFAULT NULL,
  `expiry_datetime` datetime DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`reservation_pk`),
  UNIQUE KEY `reservation_pk_UNIQUE` (`reservation_pk`),
  UNIQUE KEY `transaction_pk_UNIQUE` (`transaction_pk`),
  KEY `FK_idTag_r_idx` (`id_tag`),
  KEY `reservation_start_idx` (`start_datetime`),
  KEY `reservation_expiry_idx` (`expiry_datetime`),
  KEY `reservation_status_idx` (`status`),
  KEY `FK_connector_pk_reserv_idx` (`connector_pk`),
  CONSTRAINT `FK_connector_pk_reserv` FOREIGN KEY (`connector_pk`) REFERENCES `connector` (`connector_pk`) ON DELETE CASCADE,
  CONSTRAINT `FK_reservation_ocpp_tag_id_tag` FOREIGN KEY (`id_tag`) REFERENCES `ocpp_tag` (`id_tag`) ON DELETE CASCADE,
  CONSTRAINT `FK_transaction_pk_r` FOREIGN KEY (`transaction_pk`) REFERENCES `transaction_start` (`transaction_pk`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `reservation`
--


--
-- Table structure for table `schema_version`
--

CREATE TABLE `schema_version` (
  `installed_rank` int NOT NULL,
  `version` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `description` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `script` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checksum` int DEFAULT NULL,
  `installed_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `execution_time` int NOT NULL,
  `success` tinyint(1) NOT NULL,
  PRIMARY KEY (`installed_rank`),
  KEY `schema_version_s_idx` (`success`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `schema_version`
--

INSERT INTO `schema_version` VALUES (1,'1.0.5','stevedb','SQL_BASELINE','B1_0_5__stevedb.sql',1755536181,'steve','2025-01-22 14:50:52',547,1),(2,'1.0.6','update','SQL','V1_0_6__update.sql',-593788063,'steve','2025-01-22 14:50:52',29,1),(3,'1.0.7','update','SQL','V1_0_7__update.sql',-1929107779,'steve','2025-01-22 14:50:52',19,1),(4,'1.0.8','update','SQL','V1_0_8__update.sql',-2006455425,'steve','2026-02-17 14:12:28',131,1),(5,'1.0.9','update','SQL','V1_0_9__update.sql',-1302142153,'steve','2026-02-17 14:12:28',47,1),(6,'1.1.0','update','SQL','V1_1_0__update.sql',2128351388,'steve','2026-02-17 14:12:28',139,1),(7,'1.1.1','ocpp16 security','SQL','V1_1_1__ocpp16_security.sql',-881151254,'steve','2026-02-17 14:12:29',389,1);

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `app_id` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `heartbeat_interval_in_seconds` int DEFAULT NULL,
  `hours_to_expire` int DEFAULT NULL,
  `mail_enabled` tinyint(1) DEFAULT '0',
  `mail_host` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `mail_username` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `mail_password` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `mail_from` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `mail_protocol` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'smtp',
  `mail_port` int DEFAULT '25',
  `mail_recipients` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci COMMENT 'comma separated list of email addresses',
  `notification_features` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci COMMENT 'comma separated list',
  PRIMARY KEY (`app_id`),
  UNIQUE KEY `settings_id_UNIQUE` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` VALUES ('U3RlY2tkb3NlblZlcndhbHR1bmc=',60,1,0,'57.129.45.226:8080',NULL,NULL,NULL,'smtp',25,NULL,NULL);

--
-- Temporary view structure for view `transaction`
--

/*!50001 DROP VIEW IF EXISTS `transaction`*/;
/*!50001 CREATE VIEW `transaction` AS SELECT 
 1 AS `transaction_pk`,
 1 AS `connector_pk`,
 1 AS `id_tag`,
 1 AS `start_event_timestamp`,
 1 AS `start_timestamp`,
 1 AS `start_value`,
 1 AS `stop_event_actor`,
 1 AS `stop_event_timestamp`,
 1 AS `stop_timestamp`,
 1 AS `stop_value`,
 1 AS `stop_reason`*/;

--
-- Table structure for table `transaction_start`
--

CREATE TABLE `transaction_start` (
  `transaction_pk` int unsigned NOT NULL AUTO_INCREMENT,
  `event_timestamp` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `connector_pk` int unsigned NOT NULL,
  `id_tag` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `start_timestamp` timestamp(6) NULL DEFAULT NULL,
  `start_value` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`transaction_pk`),
  UNIQUE KEY `transaction_pk_UNIQUE` (`transaction_pk`),
  KEY `idTag_idx` (`id_tag`),
  KEY `connector_pk_idx` (`connector_pk`),
  KEY `transaction_start_idx` (`start_timestamp`),
  CONSTRAINT `FK_connector_pk_t` FOREIGN KEY (`connector_pk`) REFERENCES `connector` (`connector_pk`) ON DELETE CASCADE,
  CONSTRAINT `FK_transaction_ocpp_tag_id_tag` FOREIGN KEY (`id_tag`) REFERENCES `ocpp_tag` (`id_tag`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=978 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `transaction_start`
--

INSERT INTO `transaction_start` VALUES (959,'2026-03-02 13:45:36.406000',24546,'4EC115A2','2026-03-02 07:01:47.000000','0'),(960,'2026-03-02 13:53:48.587000',24545,'F3AE0D1D','2026-03-02 07:11:25.000000','0'),(961,'2026-03-02 13:56:26.308000',24545,'ED37E26B','2026-03-02 13:56:25.000000','0'),(962,'2026-03-02 14:00:00.975000',24544,'EB02C019','2026-03-02 07:16:31.000000','0'),(963,'2026-03-02 14:04:24.474000',24547,'EB0BD119','2026-03-02 06:51:32.000000','0'),(964,'2026-03-02 15:47:45.474000',24544,'ABD2D319','2026-03-02 15:47:44.000000','0'),(965,'2026-03-03 06:50:01.145000',24546,'BB110C1A','2026-03-03 06:50:00.000000','0'),(966,'2026-03-03 06:53:02.863000',24545,'FCE31A2E','2026-03-03 06:53:02.000000','0'),(967,'2026-03-03 07:37:16.575000',24544,'FE8E80AF','2026-03-03 07:37:16.000000','0'),(968,'2026-03-03 07:49:27.394000',24547,'4E79B4AF','2026-03-03 07:49:26.000000','0'),(969,'2026-03-04 07:15:40.426000',24546,'EB02C019','2026-03-04 07:14:45.000000','0'),(970,'2026-03-04 07:28:22.932000',24547,'EDF0CD3C','2026-03-04 07:28:22.000000','0'),(971,'2026-03-04 07:56:07.528000',24544,'DCA511CB','2026-03-04 07:56:06.000000','0'),(972,'2026-03-04 16:43:20.521000',24784,'048B8F72CC2B80','2026-03-04 16:43:19.000000','0'),(973,'2026-03-04 17:54:52.328000',24784,'3AB575A6','2026-03-04 17:54:51.000000','0'),(974,'2026-03-04 17:57:28.755000',24784,'3AB575A6','2026-03-04 17:57:27.000000','0'),(975,'2026-03-04 17:59:08.565000',24784,'3AB575A6','2026-03-04 17:59:07.000000','0'),(976,'2026-03-04 18:11:59.082000',24547,'EDF0CD3C','2026-03-04 18:11:58.000000','0'),(977,'2026-03-04 18:45:55.310000',24544,'FBB5F719','2026-03-04 18:45:54.000000','0');

--
-- Table structure for table `transaction_stop`
--

CREATE TABLE `transaction_stop` (
  `transaction_pk` int unsigned NOT NULL,
  `event_timestamp` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `event_actor` enum('station','manual') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `stop_timestamp` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `stop_value` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stop_reason` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`transaction_pk`,`event_timestamp`),
  CONSTRAINT `FK_transaction_stop_transaction_pk` FOREIGN KEY (`transaction_pk`) REFERENCES `transaction_start` (`transaction_pk`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `transaction_stop`
--

INSERT INTO `transaction_stop` VALUES (959,'2026-03-02 13:47:19.210000','station','2026-03-02 13:47:18.000000','25766','UnlockCommand'),(960,'2026-03-02 13:53:49.253000','station','2026-03-02 13:48:58.000000','9223','UnlockCommand'),(961,'2026-03-02 16:52:55.245000','station','2026-03-02 16:52:54.000000','19998',NULL),(962,'2026-03-02 14:00:01.792000','station','2026-03-02 13:48:48.000000','34916','UnlockCommand'),(963,'2026-03-02 14:04:25.162000','station','2026-03-02 13:48:24.000000','49652','UnlockCommand'),(964,'2026-03-02 18:38:37.671000','station','2026-03-02 18:38:36.000000','19184','EVDisconnected'),(965,'2026-03-03 12:00:17.434000','station','2026-03-03 12:00:16.000000','8748','UnlockCommand'),(966,'2026-03-03 12:00:13.014000','station','2026-03-03 12:00:12.000000','10194','UnlockCommand'),(967,'2026-03-03 12:00:09.015000','station','2026-03-03 12:00:08.000000','28681','UnlockCommand'),(968,'2026-03-03 12:00:04.878000','station','2026-03-03 12:00:04.000000','30176','UnlockCommand'),(969,'2026-03-04 12:00:13.128000','station','2026-03-04 12:00:12.000000','32963','UnlockCommand'),(970,'2026-03-04 12:00:04.850000','station','2026-03-04 12:00:04.000000','23553','UnlockCommand'),(971,'2026-03-04 12:00:08.968000','station','2026-03-04 12:00:08.000000','21614','UnlockCommand'),(972,'2026-03-04 16:43:52.828000','station','2026-03-04 16:43:51.000000','50','Other'),(973,'2026-03-04 17:55:36.227000','station','2026-03-04 17:55:35.000000','41',NULL),(974,'2026-03-04 17:58:01.963000','station','2026-03-04 17:58:00.000000','25',NULL),(975,'2026-03-04 17:59:24.684000','station','2026-03-04 17:59:23.000000','15',NULL),(976,'2026-03-04 18:12:19.440000','station','2026-03-04 18:12:18.000000','0','Other'),(977,'2026-03-04 18:55:14.355000','station','2026-03-04 18:55:14.000000','660',NULL);

--
-- Table structure for table `transaction_stop_failed`
--

CREATE TABLE `transaction_stop_failed` (
  `transaction_pk` int DEFAULT NULL,
  `charge_box_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `event_timestamp` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `event_actor` enum('station','manual') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `stop_timestamp` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `stop_value` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `stop_reason` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `fail_reason` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `transaction_stop_failed`
--

INSERT INTO `transaction_stop_failed` VALUES (850,'ZEUS_B2_APOLLON','2026-01-30 13:21:28.424000','station','2026-01-30 13:21:27.000000','3306','UnlockCommand','org.jooq.exception.IntegrityConstraintViolationException: SQL [insert into `stevedb`.`transaction_stop` (`transaction_pk`, `event_timestamp`, `event_actor`, `stop_timestamp`, `stop_value`, `stop_reason`) values (?, ?, ?, ?, ?, ?)]; Cannot add or update a child row: a foreign key constraint fails (`stevedb`.`transaction_stop`, CONSTRAINT `FK_transaction_stop_transaction_pk` FOREIGN KEY (`transaction_pk`) REFERENCES `transaction_start` (`transaction_pk`) ON DELETE CASCADE)\n	at org.jooq_3.19.16.MYSQL.debug(Unknown Source)\n	at org.jooq.impl.Tools.translate(Tools.java:3612)\n	at org.jooq.impl.Tools.translate(Tools.java:3602)\n	at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:827)\n	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:362)\n	at org.jooq.impl.AbstractDelegatingQuery.execute(AbstractDelegatingQuery.java:115)\n	at de.rwth.idsg.steve.repository.impl.OcppServerRepositoryImpl.updateTransaction(OcppServerRepositoryImpl.java:280)\n	at de.rwth.idsg.steve.service.CentralSystemService16_Service.stopTransaction(CentralSystemService16_Service.java:227)\n	at de.rwth.idsg.steve.ocpp.soap.CentralSystemService16_SoapServer.stopTransaction(CentralSystemService16_SoapServer.java:117)\n	at de.rwth.idsg.steve.ocpp.ws.ocpp16.Ocpp16WebSocketEndpoint$Ocpp16CallHandler.dispatch(Ocpp16WebSocketEndpoint.java:97)\n	at de.rwth.idsg.steve.ocpp.ws.pipeline.AbstractCallHandler.accept(AbstractCallHandler.java:46)\n	at de.rwth.idsg.steve.ocpp.ws.pipeline.IncomingPipeline.accept(IncomingPipeline.java:61)\n	at de.rwth.idsg.steve.ocpp.ws.AbstractWebSocketEndpoint.handleTextMessage(AbstractWebSocketEndpoint.java:117)\n	at de.rwth.idsg.steve.ocpp.ws.AbstractWebSocketEndpoint.onMessage(AbstractWebSocketEndpoint.java:89)\n	at de.rwth.idsg.steve.ocpp.ws.ConcurrentWebSocketHandler.handleMessage(ConcurrentWebSocketHandler.java:50)\n	at org.springframework.web.socket.adapter.jetty.JettyWebSocketHandlerAdapter.onWebSocketText(JettyWebSocketHandlerAdapter.java:79)\n	at org.eclipse.jetty.websocket.core.messages.StringMessageSink.accept(StringMessageSink.java:67)\n	at org.eclipse.jetty.websocket.common.JettyWebSocketFrameHandler.acceptFrame(JettyWebSocketFrameHandler.java:397)\n	at org.eclipse.jetty.websocket.common.JettyWebSocketFrameHandler.onTextFrame(JettyWebSocketFrameHandler.java:368)\n	at org.eclipse.jetty.websocket.common.JettyWebSocketFrameHandler.onFrame(JettyWebSocketFrameHandler.java:216)\n	at org.eclipse.jetty.websocket.core.WebSocketCoreSession$IncomingAdaptor.lambda$onFrame$0(WebSocketCoreSession.java:647)\n	at org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.run(ContextHandler.java:1513)\n	at org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.run(ContextHandler.java:1500)\n	at org.eclipse.jetty.websocket.core.server.internal.AbstractHandshaker$1.handle(AbstractHandshaker.java:179)\n	at org.eclipse.jetty.websocket.core.WebSocketCoreSession$IncomingAdaptor.onFrame(WebSocketCoreSession.java:647)\n	at org.eclipse.jetty.websocket.core.ExtensionStack.onFrame(ExtensionStack.java:113)\n	at org.eclipse.jetty.websocket.core.WebSocketCoreSession.onFrame(WebSocketCoreSession.java:463)\n	at org.eclipse.jetty.websocket.core.WebSocketConnection.onFrame(WebSocketConnection.java:254)\n	at org.eclipse.jetty.websocket.core.WebSocketConnection.fillAndParse(WebSocketConnection.java:447)\n	at org.eclipse.jetty.websocket.core.WebSocketConnection.onFillable(WebSocketConnection.java:332)\n	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)\n	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)\n	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)\n	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:480)\n	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:443)\n	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293)\n	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201)\n	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:311)\n	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:979)\n	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1209)\n	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1164)\n	at java.base/java.lang.Thread.run(Thread.java:1583)\nCaused by: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`stevedb`.`transaction_stop`, CONSTRAINT `FK_transaction_stop_transaction_pk` FOREIGN KEY (`transaction_pk`) REFERENCES `transaction_start` (`transaction_pk`) ON DELETE CASCADE)\n	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:109)\n	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:114)\n	at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:612)\n	at com.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:320)\n	at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:382)\n	at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)\n	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)\n	at org.jooq.tools.jdbc.DefaultPreparedStatement.execute(DefaultPreparedStatement.java:219)\n	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:458)\n	at org.jooq.impl.AbstractDMLQuery.execute(AbstractDMLQuery.java:1094)\n	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:348)\n	... 37 more\n'),(881,'ZEUS_B1_ATHENA','2026-02-06 17:04:26.655000','station','2026-02-06 17:04:25.000000','468',NULL,'org.jooq.exception.IntegrityConstraintViolationException: SQL [insert into `stevedb`.`transaction_stop` (`transaction_pk`, `event_timestamp`, `event_actor`, `stop_timestamp`, `stop_value`, `stop_reason`) values (?, ?, ?, ?, ?, ?)]; Cannot add or update a child row: a foreign key constraint fails (`stevedb`.`transaction_stop`, CONSTRAINT `FK_transaction_stop_transaction_pk` FOREIGN KEY (`transaction_pk`) REFERENCES `transaction_start` (`transaction_pk`) ON DELETE CASCADE)\n	at org.jooq_3.19.16.MYSQL.debug(Unknown Source)\n	at org.jooq.impl.Tools.translate(Tools.java:3612)\n	at org.jooq.impl.Tools.translate(Tools.java:3602)\n	at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:827)\n	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:362)\n	at org.jooq.impl.AbstractDelegatingQuery.execute(AbstractDelegatingQuery.java:115)\n	at de.rwth.idsg.steve.repository.impl.OcppServerRepositoryImpl.updateTransaction(OcppServerRepositoryImpl.java:280)\n	at de.rwth.idsg.steve.service.CentralSystemService16_Service.stopTransaction(CentralSystemService16_Service.java:227)\n	at de.rwth.idsg.steve.ocpp.soap.CentralSystemService16_SoapServer.stopTransaction(CentralSystemService16_SoapServer.java:117)\n	at de.rwth.idsg.steve.ocpp.ws.ocpp16.Ocpp16WebSocketEndpoint$Ocpp16CallHandler.dispatch(Ocpp16WebSocketEndpoint.java:97)\n	at de.rwth.idsg.steve.ocpp.ws.pipeline.AbstractCallHandler.accept(AbstractCallHandler.java:46)\n	at de.rwth.idsg.steve.ocpp.ws.pipeline.IncomingPipeline.accept(IncomingPipeline.java:61)\n	at de.rwth.idsg.steve.ocpp.ws.AbstractWebSocketEndpoint.handleTextMessage(AbstractWebSocketEndpoint.java:117)\n	at de.rwth.idsg.steve.ocpp.ws.AbstractWebSocketEndpoint.onMessage(AbstractWebSocketEndpoint.java:89)\n	at de.rwth.idsg.steve.ocpp.ws.ConcurrentWebSocketHandler.handleMessage(ConcurrentWebSocketHandler.java:50)\n	at org.springframework.web.socket.adapter.jetty.JettyWebSocketHandlerAdapter.onWebSocketText(JettyWebSocketHandlerAdapter.java:79)\n	at org.eclipse.jetty.websocket.core.messages.StringMessageSink.accept(StringMessageSink.java:67)\n	at org.eclipse.jetty.websocket.common.JettyWebSocketFrameHandler.acceptFrame(JettyWebSocketFrameHandler.java:397)\n	at org.eclipse.jetty.websocket.common.JettyWebSocketFrameHandler.onTextFrame(JettyWebSocketFrameHandler.java:368)\n	at org.eclipse.jetty.websocket.common.JettyWebSocketFrameHandler.onFrame(JettyWebSocketFrameHandler.java:216)\n	at org.eclipse.jetty.websocket.core.WebSocketCoreSession$IncomingAdaptor.lambda$onFrame$0(WebSocketCoreSession.java:647)\n	at org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.run(ContextHandler.java:1513)\n	at org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.run(ContextHandler.java:1500)\n	at org.eclipse.jetty.websocket.core.server.internal.AbstractHandshaker$1.handle(AbstractHandshaker.java:179)\n	at org.eclipse.jetty.websocket.core.WebSocketCoreSession$IncomingAdaptor.onFrame(WebSocketCoreSession.java:647)\n	at org.eclipse.jetty.websocket.core.ExtensionStack.onFrame(ExtensionStack.java:113)\n	at org.eclipse.jetty.websocket.core.WebSocketCoreSession.onFrame(WebSocketCoreSession.java:463)\n	at org.eclipse.jetty.websocket.core.WebSocketConnection.onFrame(WebSocketConnection.java:254)\n	at org.eclipse.jetty.websocket.core.WebSocketConnection.fillAndParse(WebSocketConnection.java:447)\n	at org.eclipse.jetty.websocket.core.WebSocketConnection.onFillable(WebSocketConnection.java:332)\n	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)\n	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)\n	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)\n	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:480)\n	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:443)\n	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293)\n	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201)\n	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:311)\n	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:979)\n	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1209)\n	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1164)\n	at java.base/java.lang.Thread.run(Thread.java:1583)\nCaused by: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`stevedb`.`transaction_stop`, CONSTRAINT `FK_transaction_stop_transaction_pk` FOREIGN KEY (`transaction_pk`) REFERENCES `transaction_start` (`transaction_pk`) ON DELETE CASCADE)\n	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:109)\n	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:114)\n	at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:612)\n	at com.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:320)\n	at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:382)\n	at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)\n	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)\n	at org.jooq.tools.jdbc.DefaultPreparedStatement.execute(DefaultPreparedStatement.java:219)\n	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:458)\n	at org.jooq.impl.AbstractDMLQuery.execute(AbstractDMLQuery.java:1094)\n	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:348)\n	... 37 more\n');

--
-- Table structure for table `user`
--

CREATE TABLE `user` (
  `user_pk` int NOT NULL AUTO_INCREMENT,
  `address_pk` int DEFAULT NULL,
  `first_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `last_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `birth_day` date DEFAULT NULL,
  `sex` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `phone` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `e_mail` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `notification_features` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci COMMENT 'comma separated list',
  `note` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  PRIMARY KEY (`user_pk`),
  KEY `FK_user_address_apk` (`address_pk`),
  CONSTRAINT `FK_user_address_apk` FOREIGN KEY (`address_pk`) REFERENCES `address` (`address_pk`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `user`
--


--
-- Table structure for table `user_ocpp_tag`
--

CREATE TABLE `user_ocpp_tag` (
  `user_pk` int NOT NULL,
  `ocpp_tag_pk` int NOT NULL,
  PRIMARY KEY (`user_pk`,`ocpp_tag_pk`),
  UNIQUE KEY `ocpp_tag_pk` (`ocpp_tag_pk`),
  CONSTRAINT `user_ocpp_tag_ibfk_1` FOREIGN KEY (`user_pk`) REFERENCES `user` (`user_pk`) ON DELETE CASCADE,
  CONSTRAINT `user_ocpp_tag_ibfk_2` FOREIGN KEY (`ocpp_tag_pk`) REFERENCES `ocpp_tag` (`ocpp_tag_pk`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `user_ocpp_tag`
--


--
-- Table structure for table `web_user`
--

CREATE TABLE `web_user` (
  `web_user_pk` int NOT NULL AUTO_INCREMENT,
  `username` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `password` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `api_password` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `enabled` tinyint(1) NOT NULL,
  `authorities` json NOT NULL,
  PRIMARY KEY (`web_user_pk`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `web_user`
--

INSERT INTO `web_user` VALUES (1,'admin','$2a$10$T24L4ANSFUKHLqhYyTHWK.jXIDKhrPwilx24L6JIWbBgzlu6hOM5a','$2a$10$HC4Ht5SHj0eG8EXmEgx7Ies/qZojPDVqCAsbKp.iDzphk0Hquy1iq',1,'[\"ADMIN\"]');

--
-- Final view structure for view `charge_box_certificate_signed_view`
--

/*!50001 DROP VIEW IF EXISTS `charge_box_certificate_signed_view`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`steve`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `charge_box_certificate_signed_view` AS select `c`.`certificate_id` AS `certificate_id`,`c`.`created_at` AS `created_at`,`c`.`serial_number` AS `serial_number`,`c`.`issuer_name` AS `issuer_name`,`c`.`subject_name` AS `subject_name`,`c`.`organization_name` AS `organization_name`,`c`.`common_name` AS `common_name`,`c`.`key_size` AS `key_size`,`c`.`valid_from` AS `valid_from`,`c`.`valid_to` AS `valid_to`,`c`.`signature_algorithm` AS `signature_algorithm`,`c`.`certificate_chain_pem` AS `certificate_chain_pem`,`cb`.`charge_box_id` AS `charge_box_id`,`cbcs`.`charge_box_pk` AS `charge_box_pk`,`cbcs`.`accepted` AS `accepted`,`cbcs`.`responded_at` AS `responded_at` from ((`certificate` `c` join `charge_box_certificate_signed` `cbcs` on((`cbcs`.`certificate_id` = `c`.`certificate_id`))) join `charge_box` `cb` on((`cb`.`charge_box_pk` = `cbcs`.`charge_box_pk`))) */;

--
-- Final view structure for view `charge_box_status_event`
--

/*!50001 DROP VIEW IF EXISTS `charge_box_status_event`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`steve`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `charge_box_status_event` AS select `charge_box_firmware_update_event`.`job_id` AS `job_id`,`charge_box_firmware_update_event`.`charge_box_pk` AS `charge_box_pk`,`charge_box_firmware_update_event`.`event_status` AS `event_status`,`charge_box_firmware_update_event`.`event_timestamp` AS `event_timestamp`,'FirmwareUpdate' AS `event_type` from `charge_box_firmware_update_event` union all select `charge_box_log_upload_event`.`job_id` AS `job_id`,`charge_box_log_upload_event`.`charge_box_pk` AS `charge_box_pk`,`charge_box_log_upload_event`.`event_status` AS `event_status`,`charge_box_log_upload_event`.`event_timestamp` AS `event_timestamp`,'LogUpload' AS `event_type` from `charge_box_log_upload_event` */;

--
-- Final view structure for view `ocpp_tag_activity`
--

/*!50001 DROP VIEW IF EXISTS `ocpp_tag_activity`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`steve`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ocpp_tag_activity` AS select `o`.`ocpp_tag_pk` AS `ocpp_tag_pk`,`o`.`id_tag` AS `id_tag`,`o`.`parent_id_tag` AS `parent_id_tag`,`o`.`expiry_date` AS `expiry_date`,`o`.`max_active_transaction_count` AS `max_active_transaction_count`,`o`.`note` AS `note`,count(`t`.`id_tag`) AS `active_transaction_count`,(case when (count(`t`.`id_tag`) > 0) then 1 else 0 end) AS `in_transaction`,(case when (`o`.`max_active_transaction_count` = 0) then 1 else 0 end) AS `blocked` from (`ocpp_tag` `o` left join `transaction` `t` on(((`o`.`id_tag` = `t`.`id_tag`) and (`t`.`stop_timestamp` is null) and (`t`.`stop_value` is null)))) group by `o`.`ocpp_tag_pk`,`o`.`parent_id_tag`,`o`.`expiry_date`,`o`.`max_active_transaction_count`,`o`.`note` */;

--
-- Final view structure for view `transaction`
--

/*!50001 DROP VIEW IF EXISTS `transaction`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`steve`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `transaction` AS select `tx1`.`transaction_pk` AS `transaction_pk`,`tx1`.`connector_pk` AS `connector_pk`,`tx1`.`id_tag` AS `id_tag`,`tx1`.`event_timestamp` AS `start_event_timestamp`,`tx1`.`start_timestamp` AS `start_timestamp`,`tx1`.`start_value` AS `start_value`,`tx2`.`event_actor` AS `stop_event_actor`,`tx2`.`event_timestamp` AS `stop_event_timestamp`,`tx2`.`stop_timestamp` AS `stop_timestamp`,`tx2`.`stop_value` AS `stop_value`,`tx2`.`stop_reason` AS `stop_reason` from (`transaction_start` `tx1` left join `transaction_stop` `tx2` on(((`tx1`.`transaction_pk` = `tx2`.`transaction_pk`) and (`tx2`.`event_timestamp` = (select max(`s2`.`event_timestamp`) from `transaction_stop` `s2` where (`tx2`.`transaction_pk` = `s2`.`transaction_pk`)))))) */;


