-- MariaDB dump 10.19  Distrib 10.5.23-MariaDB, for Linux (x86_64)
--
-- Host: dbase    Database: recipes
-- ------------------------------------------------------
-- Server version	10.3.35-MariaDB

/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `categories`
--

DROP TABLE IF EXISTS `categories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `recipe_id` int(11) DEFAULT NULL,
  `category` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_CATEGORY_RECIPE` (`recipe_id`),
  CONSTRAINT `FK_CATEGORY_RECIPE` FOREIGN KEY (`recipe_id`) REFERENCES `recipe` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=233 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `convtable`
--

DROP TABLE IF EXISTS `convtable`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `convtable` (
  `id` int(11) NOT NULL,
  `ckey` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL,
  `value` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `crossunitdict`
--

DROP TABLE IF EXISTS `crossunitdict`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `crossunitdict` (
  `id` int(11) NOT NULL,
  `cukey` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL,
  `value` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `density`
--

DROP TABLE IF EXISTS `density`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `density` (
  `id` int(11) NOT NULL,
  `dkey` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL,
  `value` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `info`
--

DROP TABLE IF EXISTS `info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `info` (
  `version_super` int(11) DEFAULT NULL,
  `version_major` int(11) DEFAULT NULL,
  `version_minor` int(11) DEFAULT NULL,
  `last_access` int(11) DEFAULT NULL,
  `rowid` int(11) NOT NULL,
  PRIMARY KEY (`rowid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ingredients`
--

DROP TABLE IF EXISTS `ingredients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ingredients` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `recipe_id` int(11) DEFAULT NULL,
  `refid` int(11) DEFAULT NULL,
  `unit` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `amount` float DEFAULT NULL,
  `rangeamount` float DEFAULT NULL,
  `item` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `ingkey` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `optional` tinyint(1) DEFAULT NULL,
  `shopoptional` int(11) DEFAULT NULL,
  `inggroup` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `position` int(11) DEFAULT NULL,
  `deleted` tinyint(1) DEFAULT NULL,
  `shopCat_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `refid` (`refid`),
  KEY `FK_INGREDIENT_RECIPE` (`recipe_id`),
  CONSTRAINT `FK_INGREDIENT_RECIPE` FOREIGN KEY (`recipe_id`) REFERENCES `recipe` (`id`),
  CONSTRAINT `CONSTRAINT_1` CHECK (`deleted` in (0,1)),
  CONSTRAINT `CONSTRAINT_2` CHECK (`optional` in (0,1))
) ENGINE=InnoDB AUTO_INCREMENT=3540 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `keylookup`
--

DROP TABLE IF EXISTS `keylookup`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `keylookup` (
  `id` int(11) NOT NULL,
  `word` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `item` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `ingkey` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pantry`
--

DROP TABLE IF EXISTS `pantry`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pantry` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ingkey` text COLLATE utf8mb4_bin DEFAULT NULL,
  `pantry` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  CONSTRAINT `CONSTRAINT_1` CHECK (`pantry` in (0,1))
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `plugin_info`
--

DROP TABLE IF EXISTS `plugin_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `plugin_info` (
  `plugin` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `id` int(11) NOT NULL,
  `version_super` int(11) DEFAULT NULL,
  `version_major` int(11) DEFAULT NULL,
  `version_minor` int(11) DEFAULT NULL,
  `plugin_version` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `recipe`
--

DROP TABLE IF EXISTS `recipe`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `recipe` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `instructions` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `modifications` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `cuisine` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `rating` int(11) DEFAULT NULL,
  `description` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `source` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `preptime` int(11) DEFAULT NULL,
  `cooktime` int(11) DEFAULT NULL,
  `servings` float DEFAULT NULL,
  `yields` float DEFAULT NULL,
  `yield_unit` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL,
  `image` mediumblob DEFAULT NULL,
  `thumb` blob DEFAULT NULL,
  `deleted` tinyint(1) DEFAULT NULL,
  `recipe_hash` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
  `ingredient_hash` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
  `link` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `last_modified` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  CONSTRAINT `CONSTRAINT_1` CHECK (`deleted` in (0,1))
) ENGINE=InnoDB AUTO_INCREMENT=535 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `recipe_ingredients`
--

DROP TABLE IF EXISTS `recipe_ingredients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `recipe_ingredients` (
  `Recipe_id` int(11) NOT NULL,
  `ingredientHash_id` int(11) NOT NULL,
  UNIQUE KEY `ingredientHash_id` (`ingredientHash_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shopcats`
--

DROP TABLE IF EXISTS `shopcats`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shopcats` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ingkey` text COLLATE utf8mb4_bin DEFAULT NULL,
  `shopcategory` mediumtext COLLATE utf8mb4_bin DEFAULT NULL,
  `position` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=679 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shopcatsorder`
--

DROP TABLE IF EXISTS `shopcatsorder`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shopcatsorder` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `shopcategory` text COLLATE utf8mb4_bin DEFAULT NULL,
  `position` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `unitdict`
--

DROP TABLE IF EXISTS `unitdict`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `unitdict` (
  `id` int(11) NOT NULL,
  `ukey` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL,
  `value` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2024-02-18 17:34:22
