CREATE TABLE `hops_analysis` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), `checked` tinyint(1) NOT NULL DEFAULT 0, `hop` int(11) unsigned NOT NULL COMMENT 'Hopfensorte|Hopfen für den die Analyse gilt', `source` varchar(255) NOT NULL COMMENT 'Quelle|Quelle der Analyse', `link` varchar(255) NOT NULL, `date` date DEFAULT NULL COMMENT 'Datum|Datum der Analyse', `alpha_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Alphasäuregehalt|Alphasäuregehalt in %', `alpha_max` decimal(4,1) unsigned DEFAULT NULL, `alpha` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `alpha_max` is null then `alpha_min` else round((`alpha_min` + `alpha_max`) / 2,1) end) STORED, `beta_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Betasäuregehalt|Betasäuregehalt in %', `beta_max` decimal(4,1) unsigned DEFAULT NULL, `beta` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `beta_max` is null then `beta_min` else round((`beta_min` + `beta_max`) / 2,1) end) STORED, `cohumulon_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Cohumulongehalt|Cohumulongehalt in %', `cohumulon_max` decimal(4,1) unsigned DEFAULT NULL, `cohumulon` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `cohumulon_max` is null then `cohumulon_min` else round((`cohumulon_min` + `cohumulon_max`) / 2,1) end) STORED, `colupulon_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Colupulongehalt|Colupulongehalt in %', `colupulon_max` decimal(4,1) unsigned DEFAULT NULL, `colupulon` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `colupulon_max` is null then `colupulon_min` else round((`colupulon_min` + `colupulon_max`) / 2,1) end) STORED, `polyphenol_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Polyphenolgehalt|Polyphenolgehalt in %', `polyphenol_max` decimal(4,1) unsigned DEFAULT NULL, `polyphenol` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `polyphenol_max` is null then `polyphenol_min` else round((`polyphenol_min` + `polyphenol_max`) / 2,1) end) STORED, `xanthohumol_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Xanthohumolgehalt|Xanthohumolgehalt in %', `xanthohumol_max` decimal(4,1) unsigned DEFAULT NULL, `xanthohumol` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `xanthohumol_max` is null then `xanthohumol_min` else round((`xanthohumol_min` + `xanthohumol_max`) / 2,1) end) STORED, `oil_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Aromaölgehalt|Aromaölgehalt in %', `oil_max` decimal(4,1) unsigned DEFAULT NULL, `oil` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `oil_max` is null then `oil_min` else round((`oil_min` + `oil_max`) / 2,1) end) STORED, `myrcen_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Myrcengehalt|Anteil des Myrcens am Aromaöl in %', `myrcen_max` decimal(4,1) unsigned DEFAULT NULL, `myrcen` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `myrcen_max` is null then `myrcen_min` else round((`myrcen_min` + `myrcen_max`) / 2,1) end) STORED, `linalool_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Linaloolgehalt|Anteil des Linalools am Aromaöl in %', `linalool_max` decimal(4,1) unsigned DEFAULT NULL, `linalool` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `linalool_max` is null then `linalool_min` else round((`linalool_min` + `linalool_max`) / 2,1) end) STORED, `caryophyllen_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Caryophyllengehalt|Anteil des Caryophyllens am Aromaöl in %', `caryophyllen_max` decimal(4,1) unsigned DEFAULT NULL, `caryophyllen` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `caryophyllen_max` is null then `caryophyllen_min` else round((`caryophyllen_min` + `caryophyllen_max`) / 2,1) end) STORED, `aromadendren_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Aromadendrengehalt|Anteil des Aromadendrens am Aromaöl in %', `aromadendren_max` decimal(4,1) unsigned DEFAULT NULL, `aromadendren` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `aromadendren_max` is null then `aromadendren_min` else round((`aromadendren_min` + `aromadendren_max`) / 2,1) end) STORED, `humulen_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Humulengehalt|Anteil des Humulens am Aromaöl in %', `humulen_max` decimal(4,1) unsigned DEFAULT NULL, `humulen` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `humulen_max` is null then `humulen_min` else round((`humulen_min` + `humulen_max`) / 2,1) end) STORED, `farnesen_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Farnesengehalt|Anteil des Farnesens am Aromaöl in %', `farnesen_max` decimal(4,1) unsigned DEFAULT NULL, `farnesen` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `farnesen_max` is null then `farnesen_min` else round((`farnesen_min` + `farnesen_max`) / 2,1) end) STORED, `betaselinen_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Betaselinengehalt|Anteil des Betaselinens am Aromaöl in %', `betaselinen_max` decimal(4,1) unsigned DEFAULT NULL, `betaselinen` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `betaselinen_max` is null then `betaselinen_min` else round((`betaselinen_min` + `betaselinen_max`) / 2,1) end) STORED, `alphaselinen_min` decimal(4,1) unsigned DEFAULT NULL COMMENT 'Alphaselinengehalt|Anteil des Alphaselinens am Aromaöl in %', `alphaselinen_max` decimal(4,1) unsigned DEFAULT NULL, `alphaselinen` decimal(4,1) unsigned GENERATED ALWAYS AS (case when `alphaselinen_max` is null then `alphaselinen_min` else round((`alphaselinen_min` + `alphaselinen_max`) / 2,1) end) STORED, `loss` decimal(4,1) unsigned DEFAULT NULL COMMENT '6-Monats-Verlust|Verlust an Alphasäure nach 6 Monaten Lagerung in %', `notes` text NOT NULL, PRIMARY KEY (`id`), KEY `index_hop_id` (`hop`), KEY `index_checked` (`checked`), CONSTRAINT `hops_analysis_ibfk_1` FOREIGN KEY (`hop`) REFERENCES `hops` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=359 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci COMMENT='Daten von Hopfen-Analysen'