Compare commits

...

8 Commits

Author SHA1 Message Date
198f25277b Update 'phpInterface/shoppingListConfig.php'
Added Mysql SSL
2022-03-15 13:03:27 +01:00
78b35b84f2 Update 'phpInterface/shoppingList.php'
Added Mysql SSL
2022-03-15 13:02:42 +01:00
f7c470f5a1 Upload files to 'phpInterface'
Preselect product that has just been added.
2021-05-13 14:51:36 +02:00
6d828fe56e Error display deactivated. 2021-05-09 23:21:14 +02:00
0971e3cfaf Errors fixed when creating/managing products 2021-05-08 15:07:52 +02:00
84e73a9ec5 Added rhasspyMasterUrl to php config. 2021-05-04 11:46:05 +02:00
89f51dab28 Updates 2021-05-02 21:45:32 +02:00
39db9470cc - 2021-05-02 21:24:30 +02:00
5 changed files with 2101 additions and 2042 deletions

View File

@ -0,0 +1,196 @@
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
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 */;
--
-- Database: `shoppingList`
--
-- --------------------------------------------------------
--
-- Table structure for table `listEntries`
--
CREATE TABLE `listEntries` (
`listId` int(11) NOT NULL,
`productId` int(11) NOT NULL,
`amount` float NOT NULL DEFAULT 1,
`unit` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `lists`
--
CREATE TABLE `lists` (
`id` int(11) NOT NULL,
`creationTime` bigint(20) NOT NULL,
`comment` varchar(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `products`
--
CREATE TABLE `products` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`synonyms` varchar(500) DEFAULT NULL COMMENT 'Separate entries with semicolons.',
`storeTypeId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `settings`
--
CREATE TABLE `settings` (
`settingName` varchar(100) NOT NULL,
`settingValue` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `settings`
--
INSERT INTO `settings` (`settingName`, `settingValue`) VALUES
('databaseVersion', '3');
-- --------------------------------------------------------
--
-- Table structure for table `storeTypes`
--
CREATE TABLE `storeTypes` (
`id` int(11) NOT NULL,
`name` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `units`
--
CREATE TABLE `units` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`abbreviation` varchar(10) NOT NULL,
`isDefault` tinyint(2) NOT NULL DEFAULT 0,
`isDummy` tinyint(2) NOT NULL DEFAULT 0 COMMENT 'This unit will not actually be displayed. Instead an item will just be shown without amount or unit.',
`isPiece` tinyint(2) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `listEntries`
--
ALTER TABLE `listEntries`
ADD PRIMARY KEY (`listId`,`productId`,`unit`),
ADD KEY `listEntries_ibfk_3` (`unit`),
ADD KEY `listEntries_ibfk_2` (`productId`);
--
-- Indexes for table `lists`
--
ALTER TABLE `lists`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `name` (`name`),
ADD KEY `storeTypeId` (`storeTypeId`);
--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
ADD PRIMARY KEY (`settingName`);
--
-- Indexes for table `storeTypes`
--
ALTER TABLE `storeTypes`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `name` (`name`);
--
-- Indexes for table `units`
--
ALTER TABLE `units`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `lists`
--
ALTER TABLE `lists`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `storeTypes`
--
ALTER TABLE `storeTypes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `units`
--
ALTER TABLE `units`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `listEntries`
--
ALTER TABLE `listEntries`
ADD CONSTRAINT `listEntries_ibfk_1` FOREIGN KEY (`listId`) REFERENCES `lists` (`id`),
ADD CONSTRAINT `listEntries_ibfk_2` FOREIGN KEY (`productId`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `listEntries_ibfk_3` FOREIGN KEY (`unit`) REFERENCES `units` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `products`
--
ALTER TABLE `products`
ADD CONSTRAINT `products_ibfk_1` FOREIGN KEY (`storeTypeId`) REFERENCES `storeTypes` (`id`);
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 */;

File diff suppressed because it is too large Load Diff

View File

@ -7,5 +7,8 @@
public static $mysqlpw = 'somePassword'; //Password
public static $mysqldb = 'shoppingList'; //Database
public static $mysqlPort = 3306;
public static $mysqlSSL = false;
public static $mysqlSslCertificatePath = "/etc/ssl/certs/yourCert.crt";
public static $rhasspyMasterUrl = "http://rhasspy-master:12101"; // URL of your Rhasspy master webpage WITHOUT ending slash. It is required if you want to trigger a retraining.
}
?>