Skip to content

Commit a717c70

Browse files
committed
Update pytes_mariadb.sql
allow non critical data to be Null
1 parent 30ded67 commit a717c70

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

sql/pytes_mariadb.sql

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
-- version 4.9.7
33
-- https://www.phpmyadmin.net/
44
--
5-
-- Gazdă: localhost
6-
-- Timp de generare: oct. 12, 2022 la 09:35 PM
7-
-- Versiune server: 10.3.32-MariaDB
8-
-- Versiune PHP: 7.4.28
5+
-- Host: localhost
6+
-- Generation Time: Jan 23, 2023 at 08:38 PM
7+
-- Server version: 10.3.32-MariaDB
8+
-- PHP Version: 7.4.30
99

1010
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
1111
SET AUTOCOMMIT = 0;
@@ -19,38 +19,36 @@ SET time_zone = "+00:00";
1919
/*!40101 SET NAMES utf8mb4 */;
2020

2121
--
22-
-- Bază de date: `pytes`
22+
-- Database: `pytes`
2323
--
2424
CREATE DATABASE IF NOT EXISTS `pytes` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
2525
USE `pytes`;
2626

2727
-- --------------------------------------------------------
2828

2929
--
30-
-- Structură tabel pentru tabel `pwr_data`
30+
-- Table structure for table `pwr_data`
3131
--
3232

33-
CREATE TABLE `pwr_data` (
34-
`id` INT(11) NOT NULL AUTO_INCREMENT,
33+
CREATE TABLE IF NOT EXISTS `pwr_data` (
34+
`id` int(11) NOT NULL AUTO_INCREMENT,
3535
`record_time` datetime NOT NULL DEFAULT current_timestamp(),
3636
`power` int(11) NOT NULL,
3737
`voltage` float NOT NULL,
3838
`current` float NOT NULL,
3939
`temperature` decimal(11,0) NOT NULL,
4040
`soc` int(11) NOT NULL,
4141
`basic_st` varchar(11) NOT NULL,
42-
`volt_st` varchar(11) NOT NULL,
43-
`current_st` varchar(11) NOT NULL,
44-
`temp_st` varchar(11) NOT NULL,
45-
`coul_st` varchar(11) NOT NULL,
46-
`soh_st` varchar(11) NOT NULL,
47-
`heater_st` varchar(11) NOT NULL,
48-
`bat_events` int(11) NOT NULL,
49-
`power_events` int(11) NOT NULL,
50-
`sys_events` int(11) NOT NULL,
51-
CONSTRAINT id PRIMARY KEY (id)
52-
53-
42+
`volt_st` varchar(11) DEFAULT NULL,
43+
`current_st` varchar(11) DEFAULT NULL,
44+
`temp_st` varchar(11) DEFAULT NULL,
45+
`coul_st` varchar(11) DEFAULT NULL,
46+
`soh_st` varchar(11) DEFAULT NULL,
47+
`heater_st` varchar(11) DEFAULT NULL,
48+
`bat_events` int(11) DEFAULT NULL,
49+
`power_events` int(11) DEFAULT NULL,
50+
`sys_events` int(11) DEFAULT NULL,
51+
PRIMARY KEY (`id`)
5452
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
5553
COMMIT;
5654

0 commit comments

Comments
 (0)