-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Servidor: enphase-mysql:3306
-- Tiempo de generación: 15-08-2023 a las 11:27:08
-- Versión del servidor: 10.10.2-MariaDB-1:10.10.2+maria~ubu2204
-- Versión de PHP: 8.0.27

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Base de datos: `enphase`
--

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `consumption_net`
--

CREATE TABLE `consumption_net` (
  `type` text NOT NULL,
  `activeCount` int(11) NOT NULL,
  `measurementType` text NOT NULL,
  `readingTime` datetime NOT NULL,
  `wNow` float NOT NULL,
  `whLifetime` float NOT NULL,
  `varhLeadLifetime` float NOT NULL,
  `varhLagLifetime` float NOT NULL,
  `vahLifetime` float NOT NULL,
  `rmsCurrent` float NOT NULL,
  `rmsVoltage` float NOT NULL,
  `reactPwr` float NOT NULL,
  `apprntPwr` float NOT NULL,
  `pwrFactor` float NOT NULL,
  `whToday` float NOT NULL,
  `whLastSevenDays` float NOT NULL,
  `vahToday` float NOT NULL,
  `varhLeadToday` float NOT NULL,
  `varhLagToday` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `consumption_total`
--

CREATE TABLE `consumption_total` (
  `type` text NOT NULL,
  `activeCount` int(11) NOT NULL,
  `measurementType` text NOT NULL,
  `readingTime` datetime NOT NULL,
  `wNow` float NOT NULL,
  `whLifetime` float NOT NULL,
  `varhLeadLifetime` float NOT NULL,
  `varhLagLifetime` float NOT NULL,
  `vahLifetime` float NOT NULL,
  `rmsCurrent` float NOT NULL,
  `rmsVoltage` float NOT NULL,
  `reactPwr` float NOT NULL,
  `apprntPwr` float NOT NULL,
  `pwrFactor` float NOT NULL,
  `whToday` float NOT NULL,
  `whLastSevenDays` float NOT NULL,
  `vahToday` float NOT NULL,
  `varhLeadToday` float NOT NULL,
  `varhLagToday` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `precios`
--

CREATE TABLE `precios` (
  `date` datetime DEFAULT NULL,
  `price` decimal(10,3) DEFAULT NULL,
  `units` varchar(7) DEFAULT NULL,
  `ischeap` tinyint(1) NOT NULL,
  `isunderavg` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `productioneimtest`
--

CREATE TABLE `productioneimtest` (
  `type` text DEFAULT NULL,
  `activeCount` int(11) DEFAULT NULL,
  `measurementType` text DEFAULT NULL,
  `readingTime` datetime DEFAULT NULL,
  `wNow` float DEFAULT NULL,
  `whLifetime` float DEFAULT NULL,
  `varhLeadLifetime` float DEFAULT NULL,
  `varhLagLifetime` float DEFAULT NULL,
  `vahLifetime` float DEFAULT NULL,
  `rmsCurrent` float DEFAULT NULL,
  `rmsVoltage` float DEFAULT NULL,
  `reactPwr` float DEFAULT NULL,
  `apprntPwr` float DEFAULT NULL,
  `pwrFactor` float DEFAULT NULL,
  `whToday` float DEFAULT NULL,
  `whLastSevenDays` float DEFAULT NULL,
  `vahToday` float DEFAULT NULL,
  `varhLeadToday` float DEFAULT NULL,
  `varhLagToday` float DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `production_eim`
--

CREATE TABLE `production_eim` (
  `type` text NOT NULL,
  `activeCount` int(11) NOT NULL,
  `measurementType` text NOT NULL,
  `readingTime` datetime NOT NULL,
  `wNow` float NOT NULL,
  `whLifetime` float NOT NULL,
  `varhLeadLifetime` float NOT NULL,
  `varhLagLifetime` float NOT NULL,
  `vahLifetime` float NOT NULL,
  `rmsCurrent` float NOT NULL,
  `rmsVoltage` float NOT NULL,
  `reactPwr` float NOT NULL,
  `apprntPwr` float NOT NULL,
  `pwrFactor` float NOT NULL,
  `whToday` float NOT NULL,
  `whLastSevenDays` float NOT NULL,
  `vahToday` float NOT NULL,
  `varhLeadToday` float NOT NULL,
  `varhLagToday` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `production_inverters`
--

CREATE TABLE `production_inverters` (
  `type` varchar(15) DEFAULT NULL,
  `activeCount` int(11) DEFAULT NULL,
  `readingTime` datetime DEFAULT NULL,
  `wNow` float DEFAULT NULL,
  `whLifetime` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `storage`
--

CREATE TABLE `storage` (
  `type` varchar(15) DEFAULT NULL,
  `activeCount` int(11) DEFAULT NULL,
  `readingTime` datetime DEFAULT NULL,
  `wNow` float DEFAULT NULL,
  `whNow` float DEFAULT NULL,
  `state` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
