Browse Source

Apparently adding a primary key w/ alter table no werks, even th0 it's literally exported that way -.-

Wazakindjes 2 months ago
parent
commit
aaa03ecc35
4 changed files with 4 additions and 8 deletions
  1. 1 2
      sql/cputemps.sql
  2. 1 2
      sql/drivetemps.sql
  3. 1 2
      sql/fans.sql
  4. 1 2
      sql/speedtest.sql

+ 1 - 2
sql/cputemps.sql

@@ -2,7 +2,7 @@ SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
 SET time_zone = "+00:00";
 
 CREATE TABLE IF NOT EXISTS `cputemps` (
-	`id` int(11) NOT NULL AUTO_INCREMENT,
+	`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
 	`date` timestamp NOT NULL DEFAULT current_timestamp(),
 	`fdate` char(16) CHARACTER SET utf8_unicode_ci DEFAULT NULL,
 	`core1` float NOT NULL DEFAULT 0,
@@ -22,6 +22,5 @@ CREATE TRIGGER `format_deets_lol_cputemps` BEFORE INSERT ON `cputemps`
 DELIMITER ;
 
 ALTER TABLE `cputemps`
-	ADD PRIMARY KEY (`id`),
 	ADD KEY `date` (`date`),
 	ADD KEY `fdate` (`fdate`);

+ 1 - 2
sql/drivetemps.sql

@@ -2,7 +2,7 @@ SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
 SET time_zone = "+00:00";
 
 CREATE TABLE IF NOT EXISTS `drivetemps` (
-	`id` int(11) NOT NULL AUTO_INCREMENT,
+	`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
 	`date` timestamp NOT NULL DEFAULT current_timestamp(),
 	`fdate` char(16) COLLATE utf8_unicode_ci NOT NULL,
 	`temps_data` text COLLATE utf8_unicode_ci NOT NULL
@@ -16,6 +16,5 @@ CREATE TRIGGER `format_deets_lol_drivetemps` BEFORE INSERT ON `drivetemps`
 DELIMITER ;
 
 ALTER TABLE `drivetemps`
-	ADD PRIMARY KEY (`id`),
 	ADD KEY `date` (`date`),
 	ADD KEY `fdate` (`fdate`);

+ 1 - 2
sql/fans.sql

@@ -2,7 +2,7 @@ SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
 SET time_zone = "+00:00";
 
 CREATE TABLE IF NOT EXISTS `fans` (
-	`id` int(11) NOT NULL AUTO_INCREMENT,
+	`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
 	`date` timestamp NOT NULL DEFAULT current_timestamp(),
 	`fdate` char(16) CHARACTER SET utf8_unicode_ci DEFAULT NULL,
 	`fan1` int(11) NOT NULL DEFAULT 0,
@@ -17,6 +17,5 @@ CREATE TRIGGER `format_deets_lol_fans` BEFORE INSERT ON `fans`
 DELIMITER ;
 
 ALTER TABLE `fans`
-	ADD PRIMARY KEY (`id`),
 	ADD KEY `date` (`date`),
 	ADD KEY `fdate` (`fdate`);

+ 1 - 2
sql/speedtest.sql

@@ -2,7 +2,7 @@ SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
 SET time_zone = "+00:00";
 
 CREATE TABLE IF NOT EXISTS `speedtest` (
-	`id` int(11) NOT NULL AUTO_INCREMENT,
+	`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
 	`date` timestamp NOT NULL DEFAULT current_timestamp(),
 	`fdate` char(16) COLLATE utf8_unicode_ci DEFAULT NULL,
 	`ping` float NOT NULL,
@@ -18,6 +18,5 @@ CREATE TRIGGER `format_deets_lol_speedtest` BEFORE INSERT ON `speedtest`
 DELIMITER ;
 
 ALTER TABLE `speedtest`
-	ADD PRIMARY KEY (`id`),
 	ADD KEY `fdate` (`fdate`),
 	ADD KEY `date` (`date`);