From: Banana Date: Wed, 30 Dec 2020 11:11:48 +0000 (+0100) Subject: install docu and some cleanups X-Git-Tag: 1.0~48 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=8caeb8d6c2fbf5dec98d23d508827fab12c532d3;p=bibliotheca-php.git install docu and some cleanups --- diff --git a/README b/README index 523821a..c1b0b25 100644 --- a/README +++ b/README @@ -1,5 +1,6 @@ # Bibliotheca +https://www.bananas-playground.net/projekt/bibliotheca/ ## Usage diff --git a/VERSION b/VERSION index 592ef28..df1e03b 100644 --- a/VERSION +++ b/VERSION @@ -1,9 +1,2 @@ -0.2 - Vortex Rikers (tba) - * Games and movie collection as static files with Hugo (https://gohugo.io) - * Tool: Datacrow import into Bibilotheca database -0.1 - Castle - (2019/09/31) +1.0 - Castle - (tba) * First usable version - * Static collection with hugo (https://gohugo.io) - * Static collection design based on CSS/JS Uikit (https://getuikit.com) - * Tool: Datacrow (http://www.datacrow.net/) export can be imported into static files for hugo - * Tool: Datacrow import can create static md files based on a movie collection diff --git a/documentation/bibliotheca.sql b/documentation/bibliotheca.sql deleted file mode 100644 index a6ff029..0000000 --- a/documentation/bibliotheca.sql +++ /dev/null @@ -1,384 +0,0 @@ --- phpMyAdmin SQL Dump --- version 4.9.6 --- https://www.phpmyadmin.net/ --- --- Host: 127.0.0.1 --- Generation Time: Dec 30, 2020 at 10:41 AM --- Server version: 8.0.22 --- PHP Version: 7.4.13 - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -SET AUTOCOMMIT = 0; -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: `bibliotheca` --- -CREATE DATABASE IF NOT EXISTS `bibliotheca` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; -USE `bibliotheca`; - --- -------------------------------------------------------- - --- --- Table structure for table `bib_collection` --- - -DROP TABLE IF EXISTS `bib_collection`; -CREATE TABLE `bib_collection` ( - `id` int NOT NULL, - `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `defaultSearchField` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `modificationuser` int DEFAULT NULL, - `owner` int NOT NULL, - `group` int NOT NULL, - `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- -------------------------------------------------------- - --- --- Table structure for table `bib_group` --- - -DROP TABLE IF EXISTS `bib_group`; -CREATE TABLE `bib_group` ( - `id` int NOT NULL, - `name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `protected` tinyint(1) NOT NULL DEFAULT '0', - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `modificationuser` int DEFAULT NULL, - `owner` int NOT NULL, - `group` int NOT NULL, - `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- --- Dumping data for table `bib_group` --- - -INSERT INTO `bib_group` (`id`, `name`, `description`, `protected`, `created`, `modificationuser`, `owner`, `group`, `rights`) VALUES -(1, 'Administration', 'Admin group', 1, '2020-05-31 21:25:29', 0, 1, 1, 'rwx------'), -(2, 'Users', 'Default user group', 1, '2020-05-31 21:25:29', 0, 1, 1, 'rwxr--r--'), -(3, 'Anonymous', 'Anonymous users', 1, '2020-05-31 21:25:29', 0, 1, 1, 'rwxr--r--'); - --- -------------------------------------------------------- - --- --- Table structure for table `bib_menu` --- - -DROP TABLE IF EXISTS `bib_menu`; -CREATE TABLE `bib_menu` ( - `id` int UNSIGNED NOT NULL, - `text` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `icon` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `owner` int NOT NULL DEFAULT '0', - `group` int NOT NULL DEFAULT '0', - `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `position` int NOT NULL DEFAULT '0', - `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- --- Dumping data for table `bib_menu` --- - -INSERT INTO `bib_menu` (`id`, `text`, `action`, `icon`, `owner`, `group`, `rights`, `position`, `category`) VALUES -(1, 'Dashboard', '', 'home', 1, 1, 'rw-r--r--', 0, 'show'), -(2, 'Collections', 'collections', 'database', 1, 1, 'rw-r--r--', 1, 'show'), -(3, 'Tags', 'tags', 'tag', 1, 1, 'rw-r--r--', 2, 'show'), -(4, 'Add', 'manageentry', 'plus-circle', 1, 2, 'rw-rw----', 0, 'manage'), -(6, 'Tags', 'managetags', 'tag', 1, 2, 'rw-rw----', 2, 'manage'), -(7, 'Collections', 'managecolletions', 'database', 1, 2, 'rw-rw----', 3, 'manage'), -(8, 'Users', 'manageusers', 'users', 1, 1, 'rw-------', 4, 'manage'), -(9, 'Login', 'auth', '', 1, 1, 'rw-r--r--', 0, ''), -(10, 'Collection fields', 'managecollectionfields', '', 1, 1, 'rw-------', 0, ''), -(11, 'Entry', 'entry', '', 1, 1, 'rw-r--r--', 0, ''), -(12, 'Search', 'search', '', 1, 1, 'rw-r--r--', 0, ''), -(13, 'Edit', 'collections', 'pencil', 1, 2, 'rw-rw----', 1, 'manage'), -(14, 'Tool', 'tool', '', 1, 1, 'rw-------', 0, ''); - --- -------------------------------------------------------- - --- --- Table structure for table `bib_sys_fields` --- - -DROP TABLE IF EXISTS `bib_sys_fields`; -CREATE TABLE `bib_sys_fields` ( - `id` int NOT NULL, - `identifier` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `displayname` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `searchtype` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, - `createstring` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, - `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci, - `apiinfo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `modificationuser` int DEFAULT NULL, - `owner` int NOT NULL, - `group` int NOT NULL, - `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- --- Dumping data for table `bib_sys_fields` --- - -INSERT INTO `bib_sys_fields` (`id`, `identifier`, `displayname`, `type`, `searchtype`, `createstring`, `value`, `apiinfo`, `created`, `modificationuser`, `owner`, `group`, `rights`) VALUES -(1, 'title', 'Title', 'text', 'text', '`title` varchar(128) NOT NULL', NULL, 'string 128', '2019-09-01 18:26:33', 0, 1, 1, 'rw-r--r--'), -(2, 'description', 'Description', 'text3', 'text', '`description` varchar(255) NULL DEFAULT NULL', NULL, 'string 64', '2019-09-01 18:28:35', 0, 1, 1, 'rw-r--r--'), -(3, 'content', 'Main content', 'textarea', 'text', 'content` text NULL DEFAULT NULL,', NULL, 'mysql text', '2019-09-01 18:28:35', 0, 1, 1, 'rw-r--r--'), -(4, 'releasedate', 'Release date', 'date', 'text', '`releasedate` timestamp NULL DEFAULT NULL', NULL, 'mysql timestamp', '2019-09-01 19:01:39', 0, 1, 1, 'rw-r--r--'), -(5, 'tag', 'Tag', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2019-09-01 19:11:18', 0, 1, 1, 'rw-r--r--'), -(6, 'category', 'Category', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2019-09-01 19:11:18', 0, 1, 1, 'rw-r--r--'), -(7, 'publisher', 'Publisher', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2019-09-01 19:17:51', 0, 1, 1, 'rw-r--r--'), -(8, 'developer', 'Developer', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2019-09-01 19:17:51', 0, 1, 1, 'rw-r--r--'), -(9, 'platform', 'Platform', 'selection', 'tag', '`platform` varchar(32) NULL DEFAULT NULL', 'PC,Xbox,Playstation,Nintendo,Nintendo Switch', 'One of PC,Xbox,Playstation,Nintendo,Nintendo Switch', '2019-09-01 19:18:33', 0, 1, 1, 'rw-r--r--'), -(10, 'storage', 'Storage', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2019-09-01 19:18:33', 0, 1, 1, 'rw-r--r--'), -(13, 'rating', 'Rating', 'selection', 'tag', '`rating` varchar(16) NULL DEFAULT NULL', '0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10', 'One of 0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10', '2019-09-01 19:25:35', 0, 1, 1, 'rw-r--r--'), -(14, 'year', 'Year', 'year', 'tag', '`year` year NULL DEFAULT NULL', NULL, 'mysql year', '2019-09-01 19:30:11', 0, 1, 1, 'rw-r--r--'), -(15, 'coverimage', 'Cover image', 'upload', NULL, NULL, NULL, 'One file in $_FILES[uploads] of post', '2019-09-01 19:48:44', 0, 1, 1, 'rw-r--r--'), -(16, 'attachment', 'Attachments', 'upload_multiple', NULL, NULL, NULL, 'Multiple in $_FILES[uploads] of post', '2019-09-01 19:48:44', 0, 1, 1, 'rw-r--r--'), -(17, 'os', 'Operating system and version', 'selection', 'tag', '`os` varchar(32) NULL DEFAULT NULL', 'Windows 10,Windows 95, Windows 99,Windows XP, Windows ME, Windows 2000,Windows Vista,Windows 8', 'One of Windows 10,Windows 95, Windows 99,Windows XP, Windows ME, Windows 2000,Windows Vista,Windows 8', '2019-09-01 19:55:13', 0, 1, 1, 'rw-r--r--'), -(18, 'actors', 'Actors', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2020-07-26 07:12:48', NULL, 1, 1, 'rw-r--r--'), -(19, 'countries', 'Countries', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2020-07-26 07:16:08', NULL, 1, 1, 'rw-r--r--'), -(20, 'directors', 'Directors', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2020-07-26 07:17:59', NULL, 1, 1, 'rw-r--r--'), -(21, 'genres', 'Genres', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2020-07-26 07:18:55', NULL, 1, 1, 'rw-r--r--'), -(22, 'languages', 'Languages', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2020-07-26 07:20:45', NULL, 1, 1, 'rw-r--r--'), -(23, 'runtime', 'Runtime', 'text', 'text', '`runtime` varchar(128) NULL DEFAULT NULL', NULL, 'string 128', '2020-07-26 07:22:24', NULL, 1, 1, 'rw-r--r--'), -(24, 'imdbrating', 'IMDB Rating', 'text', 'text', '`imdbrating` varchar(128) NULL DEFAULT NULL', NULL, 'string 128', '2020-12-27 10:00:33', 0, 1, 1, 'rw-r--r--'), -(25, 'viewcount', 'View counter', 'text', 'text', '`viewcount` varchar(128) NULL DEFAULT NULL', NULL, 'string 128', '2020-12-27 10:41:10', 0, 1, 1, 'rw-r--r--'); - --- -------------------------------------------------------- - --- --- Table structure for table `bib_tool` --- - -DROP TABLE IF EXISTS `bib_tool`; -CREATE TABLE `bib_tool` ( - `id` int NOT NULL, - `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `description` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `target` varchar(16) NOT NULL, - `owner` int NOT NULL, - `group` int NOT NULL, - `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- --- Dumping data for table `bib_tool` --- - -INSERT INTO `bib_tool` (`id`, `name`, `description`, `action`, `target`, `owner`, `group`, `rights`) VALUES -(1, 'IMDB web', 'Web parser', 'imdbweb', '_self', 1, 1, 'rw-r--r--'); - --- -------------------------------------------------------- - --- --- Table structure for table `bib_tool2collection` --- - -DROP TABLE IF EXISTS `bib_tool2collection`; -CREATE TABLE `bib_tool2collection` ( - `fk_tool_id` int NOT NULL, - `fk_collection_id` int NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- -------------------------------------------------------- - --- --- Table structure for table `bib_user` --- - -DROP TABLE IF EXISTS `bib_user`; -CREATE TABLE `bib_user` ( - `id` int NOT NULL, - `login` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `active` int NOT NULL DEFAULT '1', - `apiToken` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, - `apiTokenValidDate` timestamp NULL DEFAULT NULL, - `baseGroupId` int NOT NULL DEFAULT '0', - `protected` tinyint(1) NOT NULL DEFAULT '0', - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `modificationuser` int DEFAULT NULL, - `owner` int NOT NULL, - `group` int NOT NULL, - `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- --- Dumping data for table `bib_user` --- - -INSERT INTO `bib_user` (`id`, `login`, `password`, `name`, `active`, `apiToken`, `apiTokenValidDate`, `baseGroupId`, `protected`, `created`, `modificationuser`, `owner`, `group`, `rights`) VALUES -(1, 'admin', '$2y$10$BdLVGaeiQc12smmNKf4rk.2Dj6ockECsSlpx1eO7RWN3RbX2gYrai', 'Administrator', 1, NULL, NULL, 1, 1, '2019-09-01 17:22:02', 0, 1, 1, 'rwxr-----'), -(2, 'anonymoose', '', 'Anonymoose', 1, NULL, NULL, 3, 1, '2020-05-03 17:22:02', 0, 2, 3, 'rwxr--r--'), -(4, 'banana', '$2y$10$9NtLpBt97bCQ22Qdz3HvjOyTXIlGBXPMaHOQytF64DnoxQJZG3xe.', 'Banana', 1, 'c435168733c58b82d455d776990ff425', '2020-11-23 14:43:55', 1, 0, '2020-05-30 18:23:01', 0, 4, 2, 'rwxr--r--'); - --- -------------------------------------------------------- - --- --- Table structure for table `bib_user2group` --- - -DROP TABLE IF EXISTS `bib_user2group`; -CREATE TABLE `bib_user2group` ( - `fk_user_id` int NOT NULL DEFAULT '0', - `fk_group_id` int NOT NULL DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- --- Dumping data for table `bib_user2group` --- - -INSERT INTO `bib_user2group` (`fk_user_id`, `fk_group_id`) VALUES -(1, 1), -(2, 3), -(4, 1); - --- -------------------------------------------------------- - --- --- Table structure for table `bib_userSession` --- - -DROP TABLE IF EXISTS `bib_userSession`; -CREATE TABLE `bib_userSession` ( - `fk_user_id` int NOT NULL, - `loginTime` datetime NOT NULL, - `area` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '', - `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, - `salt` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- --- Dumping data for table `bib_userSession` --- - -INSERT INTO `bib_userSession` (`fk_user_id`, `loginTime`, `area`, `token`, `salt`) VALUES -(4, '2020-12-30 10:49:31', 'bibliotheca-session', '81e5e56bfad6200d0f5a4812b9fbd976e68359fb', '03c4f30d'); - --- --- Indexes for dumped tables --- - --- --- Indexes for table `bib_collection` --- -ALTER TABLE `bib_collection` - ADD PRIMARY KEY (`id`); - --- --- Indexes for table `bib_group` --- -ALTER TABLE `bib_group` - ADD PRIMARY KEY (`id`); - --- --- Indexes for table `bib_menu` --- -ALTER TABLE `bib_menu` - ADD PRIMARY KEY (`id`); - --- --- Indexes for table `bib_sys_fields` --- -ALTER TABLE `bib_sys_fields` - ADD PRIMARY KEY (`id`) USING BTREE; - --- --- Indexes for table `bib_tool` --- -ALTER TABLE `bib_tool` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `action` (`action`); - --- --- Indexes for table `bib_tool2collection` --- -ALTER TABLE `bib_tool2collection` - ADD UNIQUE KEY `fk_collection_id` (`fk_collection_id`,`fk_tool_id`); - --- --- Indexes for table `bib_user` --- -ALTER TABLE `bib_user` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `login` (`login`); - --- --- Indexes for table `bib_user2group` --- -ALTER TABLE `bib_user2group` - ADD PRIMARY KEY (`fk_user_id`,`fk_group_id`); - --- --- Indexes for table `bib_userSession` --- -ALTER TABLE `bib_userSession` - ADD PRIMARY KEY (`area`); - --- --- AUTO_INCREMENT for dumped tables --- - --- --- AUTO_INCREMENT for table `bib_collection` --- -ALTER TABLE `bib_collection` - MODIFY `id` int NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT for table `bib_group` --- -ALTER TABLE `bib_group` - MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; - --- --- AUTO_INCREMENT for table `bib_menu` --- -ALTER TABLE `bib_menu` - MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; - --- --- AUTO_INCREMENT for table `bib_sys_fields` --- -ALTER TABLE `bib_sys_fields` - MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26; - --- --- AUTO_INCREMENT for table `bib_tool` --- -ALTER TABLE `bib_tool` - MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; - --- --- AUTO_INCREMENT for table `bib_user` --- -ALTER TABLE `bib_user` - MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -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 */; diff --git a/documentation/setup/bibliotheca.sql b/documentation/setup/bibliotheca.sql index 4567e83..a1ef00c 100644 --- a/documentation/setup/bibliotheca.sql +++ b/documentation/setup/bibliotheca.sql @@ -1,11 +1,11 @@ -- phpMyAdmin SQL Dump --- version 4.8.5 +-- version 4.9.6 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 --- Generation Time: Sep 01, 2019 at 08:27 PM --- Server version: 5.7.26-log --- PHP Version: 7.3.8 +-- Generation Time: Dec 30, 2020 at 10:41 AM +-- Server version: 8.0.22 +-- PHP Version: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; @@ -18,306 +18,354 @@ SET time_zone = "+00:00"; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; +-- -------------------------------------------------------- + -- --- Database: `bibliotheca` +-- Table structure for table `bib_collection` -- -CREATE DATABASE IF NOT EXISTS `bibliotheca` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -USE `bibliotheca`; + +DROP TABLE IF EXISTS `#REPLACEME#_collection`; +CREATE TABLE `bib_collection` ( + `id` int NOT NULL, + `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `defaultSearchField` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modificationuser` int DEFAULT NULL, + `owner` int NOT NULL, + `group` int NOT NULL, + `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- -------------------------------------------------------- -- --- Table structure for table `bib_collection` +-- Table structure for table `bib_group` -- -DROP TABLE IF EXISTS `bib_collection`; -CREATE TABLE `bib_collection` ( - `id` int(10) NOT NULL, - `name` varchar(64) COLLATE utf8mb4_bin NOT NULL, - `description` varchar(255) COLLATE utf8mb4_bin NOT NULL, +DROP TABLE IF EXISTS `#REPLACEME#_group`; +CREATE TABLE `#REPLACEME#_group` ( + `id` int NOT NULL, + `name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `protected` tinyint(1) NOT NULL DEFAULT '0', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `modified` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, - `modificationuser` int(11) NOT NULL, - `owner` int(10) NOT NULL, - `group` int(10) NOT NULL, - `rights` char(9) COLLATE utf8mb4_bin NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modificationuser` int DEFAULT NULL, + `owner` int NOT NULL, + `group` int NOT NULL, + `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- --- Dumping data for table `bib_collection` +-- Dumping data for table `#REPLACEME#_group` -- -INSERT INTO `bib_collection` (`id`, `name`, `description`, `created`, `modified`, `modificationuser`, `owner`, `group`, `rights`) VALUES -(1, 'Movies', 'Movie collection', '2019-09-01 17:26:23', NULL, 0, 2, 2, 'rwxrw-r--'), -(2, 'Games', 'Game collection', '2019-09-01 17:26:56', NULL, 0, 2, 2, 'rwxrw-r--'); +INSERT INTO `#REPLACEME#_group` (`id`, `name`, `description`, `protected`, `created`, `modificationuser`, `owner`, `group`, `rights`) VALUES +(1, 'Administration', 'Admin group', 1, '2020-05-31 21:25:29', 0, 1, 1, 'rwx------'), +(2, 'Users', 'Default user group', 1, '2020-05-31 21:25:29', 0, 1, 1, 'rwxr--r--'), +(3, 'Anonymous', 'Anonymous users', 1, '2020-05-31 21:25:29', 0, 1, 1, 'rwxr--r--'); -- -------------------------------------------------------- -- --- Table structure for table `bib_collection_entry_1` +-- Table structure for table `#REPLACEME#_menu` -- -DROP TABLE IF EXISTS `bib_collection_entry_1`; -CREATE TABLE `bib_collection_entry_1` ( - `id` int(10) NOT NULL, - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `modificationuser` int(10) NOT NULL, - `title` varchar(128) COLLATE utf8mb4_bin NOT NULL, - `description` varchar(255) COLLATE utf8mb4_bin NOT NULL, - `content` text COLLATE utf8mb4_bin NOT NULL, - `releasedate` timestamp NULL DEFAULT NULL, - `year` year(4) DEFAULT NULL, - `image` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; +DROP TABLE IF EXISTS `#REPLACEME#_menu`; +CREATE TABLE `#REPLACEME#_menu` ( + `id` int UNSIGNED NOT NULL, + `text` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `icon` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `owner` int NOT NULL DEFAULT '0', + `group` int NOT NULL DEFAULT '0', + `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `position` int NOT NULL DEFAULT '0', + `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- +-- Dumping data for table `#REPLACEME#_menu` +-- + +INSERT INTO `#REPLACEME#_menu` (`id`, `text`, `action`, `icon`, `owner`, `group`, `rights`, `position`, `category`) VALUES +(1, 'Dashboard', '', 'home', 1, 1, 'rw-r--r--', 0, 'show'), +(2, 'Collections', 'collections', 'database', 1, 1, 'rw-r--r--', 1, 'show'), +(3, 'Tags', 'tags', 'tag', 1, 1, 'rw-r--r--', 2, 'show'), +(4, 'Add', 'manageentry', 'plus-circle', 1, 2, 'rw-rw----', 0, 'manage'), +(6, 'Tags', 'managetags', 'tag', 1, 2, 'rw-rw----', 2, 'manage'), +(7, 'Collections', 'managecolletions', 'database', 1, 2, 'rw-rw----', 3, 'manage'), +(8, 'Users', 'manageusers', 'users', 1, 1, 'rw-------', 4, 'manage'), +(9, 'Login', 'auth', '', 1, 1, 'rw-r--r--', 0, ''), +(10, 'Collection fields', 'managecollectionfields', '', 1, 1, 'rw-------', 0, ''), +(11, 'Entry', 'entry', '', 1, 1, 'rw-r--r--', 0, ''), +(12, 'Search', 'search', '', 1, 1, 'rw-r--r--', 0, ''), +(13, 'Edit', 'collections', 'pencil', 1, 2, 'rw-rw----', 1, 'manage'), +(14, 'Tool', 'tool', '', 1, 1, 'rw-------', 0, ''); -- -------------------------------------------------------- -- --- Table structure for table `bib_collection_field_1` +-- Table structure for table `#REPLACEME#_sys_fields` -- -DROP TABLE IF EXISTS `bib_collection_field_1`; -CREATE TABLE `bib_collection_field_1` ( - `id` int(11) NOT NULL, - `identifier` varchar(16) COLLATE utf8mb4_bin NOT NULL, - `displayname` varchar(128) COLLATE utf8mb4_bin NOT NULL, - `type` varchar(32) COLLATE utf8mb4_bin NOT NULL, - `position` int(10) DEFAULT NULL, - `searchable` tinyint(1) DEFAULT NULL, - `protected` tinyint(1) NOT NULL DEFAULT '0', +DROP TABLE IF EXISTS `#REPLACEME#_sys_fields`; +CREATE TABLE `#REPLACEME#_sys_fields` ( + `id` int NOT NULL, + `identifier` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `displayname` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `searchtype` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `createstring` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci, + `apiinfo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `modificationuser` int(10) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; - --- --- Dumping data for table `bib_collection_field_1` --- - -INSERT INTO `bib_collection_field_1` (`id`, `identifier`, `displayname`, `type`, `position`, `searchable`, `protected`, `created`, `modified`, `modificationuser`) VALUES -(1, 'title', 'Title', 'varchar', NULL, NULL, 1, '2019-09-01 18:26:33', '2019-09-01 18:53:00', 2), -(2, 'description', 'Description', 'varchar', NULL, NULL, 1, '2019-09-01 18:28:35', '2019-09-01 18:53:04', 2), -(3, 'content', 'Main content', 'text', NULL, NULL, 1, '2019-09-01 18:28:35', '2019-09-01 18:53:07', 2), -(4, 'releasedate', 'Release date', 'date', NULL, NULL, 0, '2019-09-01 19:01:39', '2019-09-01 19:29:13', 2), -(5, 'tag', 'Tag', 'lookupmultiple', NULL, NULL, 0, '2019-09-01 19:11:18', '2019-09-01 19:28:42', 2), -(6, 'category', 'Category', 'lookupmultiple', NULL, NULL, 0, '2019-09-01 19:11:18', '2019-09-01 19:28:48', 2), -(7, 'publisher', 'Publisher', 'lookupmultiple', NULL, NULL, 0, '2019-09-01 19:17:51', '2019-09-01 19:20:31', 2), -(8, 'developer', 'Developer', 'lookupmultiple', NULL, NULL, 0, '2019-09-01 19:17:51', '2019-09-01 19:20:36', 2), -(9, 'platform', 'Platform', 'lookup', NULL, NULL, 0, '2019-09-01 19:18:33', '2019-09-01 19:20:44', 2), -(10, 'storage', 'Storage', 'lookup', NULL, NULL, 0, '2019-09-01 19:18:33', '2019-09-01 19:20:57', 2), -(13, 'rating', 'Rating', 'lookup', NULL, NULL, 0, '2019-09-01 19:25:35', '2019-09-01 19:25:35', 2), -(14, 'year', 'Year', 'year', NULL, NULL, 0, '2019-09-01 19:30:11', '2019-09-01 19:31:11', 2), -(15, 'coverimage', 'Cover image', 'image', NULL, NULL, 0, '2019-09-01 19:48:44', '2019-09-01 19:48:44', 2), -(16, 'attachment', 'Attachments', 'upload', NULL, NULL, 0, '2019-09-01 19:48:44', '2019-09-01 19:48:44', 2), -(17, 'os', 'Operating system and version', 'lookupmultiple', NULL, NULL, 0, '2019-09-01 19:55:13', '2019-09-01 19:55:13', 2); + `modificationuser` int DEFAULT NULL, + `owner` int NOT NULL, + `group` int NOT NULL, + `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- +-- Dumping data for table `#REPLACEME#_sys_fields` +-- + +INSERT INTO `#REPLACEME#_sys_fields` (`id`, `identifier`, `displayname`, `type`, `searchtype`, `createstring`, `value`, `apiinfo`, `created`, `modificationuser`, `owner`, `group`, `rights`) VALUES +(1, 'title', 'Title', 'text', 'text', '`title` varchar(128) NOT NULL', NULL, 'string 128', '2019-09-01 18:26:33', 0, 1, 1, 'rw-r--r--'), +(2, 'description', 'Description', 'text3', 'text', '`description` varchar(255) NULL DEFAULT NULL', NULL, 'string 64', '2019-09-01 18:28:35', 0, 1, 1, 'rw-r--r--'), +(3, 'content', 'Main content', 'textarea', 'text', 'content` text NULL DEFAULT NULL,', NULL, 'mysql text', '2019-09-01 18:28:35', 0, 1, 1, 'rw-r--r--'), +(4, 'releasedate', 'Release date', 'date', 'text', '`releasedate` timestamp NULL DEFAULT NULL', NULL, 'mysql timestamp', '2019-09-01 19:01:39', 0, 1, 1, 'rw-r--r--'), +(5, 'tag', 'Tag', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2019-09-01 19:11:18', 0, 1, 1, 'rw-r--r--'), +(6, 'category', 'Category', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2019-09-01 19:11:18', 0, 1, 1, 'rw-r--r--'), +(7, 'publisher', 'Publisher', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2019-09-01 19:17:51', 0, 1, 1, 'rw-r--r--'), +(8, 'developer', 'Developer', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2019-09-01 19:17:51', 0, 1, 1, 'rw-r--r--'), +(9, 'platform', 'Platform', 'selection', 'tag', '`platform` varchar(32) NULL DEFAULT NULL', 'PC,Xbox,Playstation,Nintendo,Nintendo Switch', 'One of PC,Xbox,Playstation,Nintendo,Nintendo Switch', '2019-09-01 19:18:33', 0, 1, 1, 'rw-r--r--'), +(10, 'storage', 'Storage', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2019-09-01 19:18:33', 0, 1, 1, 'rw-r--r--'), +(13, 'rating', 'Rating', 'selection', 'tag', '`rating` varchar(16) NULL DEFAULT NULL', '0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10', 'One of 0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10', '2019-09-01 19:25:35', 0, 1, 1, 'rw-r--r--'), +(14, 'year', 'Year', 'year', 'tag', '`year` year NULL DEFAULT NULL', NULL, 'mysql year', '2019-09-01 19:30:11', 0, 1, 1, 'rw-r--r--'), +(15, 'coverimage', 'Cover image', 'upload', NULL, NULL, NULL, 'One file in $_FILES[uploads] of post', '2019-09-01 19:48:44', 0, 1, 1, 'rw-r--r--'), +(16, 'attachment', 'Attachments', 'upload_multiple', NULL, NULL, NULL, 'Multiple in $_FILES[uploads] of post', '2019-09-01 19:48:44', 0, 1, 1, 'rw-r--r--'), +(17, 'os', 'Operating system and version', 'selection', 'tag', '`os` varchar(32) NULL DEFAULT NULL', 'Windows 10,Windows 95, Windows 99,Windows XP, Windows ME, Windows 2000,Windows Vista,Windows 8', 'One of Windows 10,Windows 95, Windows 99,Windows XP, Windows ME, Windows 2000,Windows Vista,Windows 8', '2019-09-01 19:55:13', 0, 1, 1, 'rw-r--r--'), +(18, 'actors', 'Actors', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2020-07-26 07:12:48', NULL, 1, 1, 'rw-r--r--'), +(19, 'countries', 'Countries', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2020-07-26 07:16:08', NULL, 1, 1, 'rw-r--r--'), +(20, 'directors', 'Directors', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2020-07-26 07:17:59', NULL, 1, 1, 'rw-r--r--'), +(21, 'genres', 'Genres', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2020-07-26 07:18:55', NULL, 1, 1, 'rw-r--r--'), +(22, 'languages', 'Languages', 'lookupmultiple', 'tag', NULL, NULL, 'string 64', '2020-07-26 07:20:45', NULL, 1, 1, 'rw-r--r--'), +(23, 'runtime', 'Runtime', 'text', 'text', '`runtime` varchar(128) NULL DEFAULT NULL', NULL, 'string 128', '2020-07-26 07:22:24', NULL, 1, 1, 'rw-r--r--'), +(24, 'imdbrating', 'IMDB Rating', 'text', 'text', '`imdbrating` varchar(128) NULL DEFAULT NULL', NULL, 'string 128', '2020-12-27 10:00:33', 0, 1, 1, 'rw-r--r--'), +(25, 'viewcount', 'View counter', 'text', 'text', '`viewcount` varchar(128) NULL DEFAULT NULL', NULL, 'string 128', '2020-12-27 10:41:10', 0, 1, 1, 'rw-r--r--'); -- -------------------------------------------------------- -- --- Table structure for table `bib_collection_lookup2entry_1` +-- Table structure for table `#REPLACEME#_tool` -- -DROP TABLE IF EXISTS `bib_collection_lookup2entry_1`; -CREATE TABLE `bib_collection_lookup2entry_1` ( - `lookup` int(10) NOT NULL, - `entry` int(10) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; - --- -------------------------------------------------------- +DROP TABLE IF EXISTS `#REPLACEME#_tool`; +CREATE TABLE `#REPLACEME#_tool` ( + `id` int NOT NULL, + `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `description` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `target` varchar(16) NOT NULL, + `owner` int NOT NULL, + `group` int NOT NULL, + `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- --- Table structure for table `bib_collection_lookup_1` +-- Dumping data for table `#REPLACEME#_tool` -- -DROP TABLE IF EXISTS `bib_collection_lookup_1`; -CREATE TABLE `bib_collection_lookup_1` ( - `id` int(10) NOT NULL, - `name` varchar(32) COLLATE utf8mb4_bin NOT NULL, - `position` int(10) NOT NULL DEFAULT '0', - `field` int(10) NOT NULL, - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `modificationuser` int(10) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; +INSERT INTO `#REPLACEME#_tool` (`id`, `name`, `description`, `action`, `target`, `owner`, `group`, `rights`) VALUES +(1, 'IMDB web', 'Web parser', 'imdbweb', '_self', 1, 1, 'rw-r--r--'); + +-- -------------------------------------------------------- -- --- Dumping data for table `bib_collection_lookup_1` +-- Table structure for table `#REPLACEME#_tool2collection` -- -INSERT INTO `bib_collection_lookup_1` (`id`, `name`, `position`, `field`, `created`, `modified`, `modificationuser`) VALUES -(1, 'PC', 0, 9, '2019-09-01 19:53:27', '2019-09-01 19:53:27', 2), -(2, 'Nintendo Switch', 0, 9, '2019-09-01 19:54:21', '2019-09-01 19:54:21', 2), -(3, 'Windows 95', 0, 17, '2019-09-01 19:55:44', '2019-09-01 19:55:44', 2), -(4, 'Windows 98', 0, 17, '2019-09-01 19:56:00', '2019-09-01 19:56:00', 2), -(5, 'Windows ME', 0, 17, '2019-09-01 19:56:21', '2019-09-01 19:56:21', 2), -(6, 'Windows 2000', 0, 17, '2019-09-01 19:56:21', '2019-09-01 19:56:21', 2), -(7, 'Windows XP', 0, 17, '2019-09-01 19:56:44', '2019-09-01 19:56:44', 2), -(8, 'Windows Vista', 0, 17, '2019-09-01 19:56:44', '2019-09-01 19:56:44', 2), -(9, '1/10', 0, 13, '2019-09-01 19:58:23', '2019-09-01 19:58:23', 2), -(10, '2/10', 0, 13, '2019-09-01 19:58:23', '2019-09-01 19:58:23', 2), -(11, '3/10', 0, 13, '2019-09-01 19:58:40', '2019-09-01 19:58:40', 2), -(12, '4/10', 0, 13, '2019-09-01 19:58:40', '2019-09-01 19:58:40', 2), -(13, '5/10', 0, 13, '2019-09-01 19:58:56', '2019-09-01 19:58:56', 2), -(14, '6/10', 0, 13, '2019-09-01 19:58:56', '2019-09-01 19:58:56', 2); +DROP TABLE IF EXISTS `#REPLACEME#_tool2collection`; +CREATE TABLE `#REPLACEME#_tool2collection` ( + `fk_tool_id` int NOT NULL, + `fk_collection_id` int NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- -------------------------------------------------------- -- --- Table structure for table `bib_group` +-- Table structure for table `#REPLACEME#_user` -- -DROP TABLE IF EXISTS `bib_group`; -CREATE TABLE `bib_group` ( - `id` int(10) NOT NULL, - `name` varchar(16) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', - `describtion` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', - `active` tinyint(1) NOT NULL DEFAULT '1', - `protected` tinyint(1) NOT NULL DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; +DROP TABLE IF EXISTS `#REPLACEME#_user`; +CREATE TABLE `#REPLACEME#_user` ( + `id` int NOT NULL, + `login` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `active` int NOT NULL DEFAULT '1', + `apiToken` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `apiTokenValidDate` timestamp NULL DEFAULT NULL, + `baseGroupId` int NOT NULL DEFAULT '0', + `protected` tinyint(1) NOT NULL DEFAULT '0', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modificationuser` int DEFAULT NULL, + `owner` int NOT NULL, + `group` int NOT NULL, + `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- --- Dumping data for table `bib_group` +-- Dumping data for table `#REPLACEME#_user` -- -INSERT INTO `bib_group` (`id`, `name`, `describtion`, `active`, `protected`) VALUES -(1, 'Administration', 'Die Gruppe die alles darf.', 1, 1), -(2, 'Benutzergruppe', 'Standard Benutzergruppe', 1, 1), -(3, 'Gast', 'Die Gast Gruppe.', 1, 1), -(8, 'Collection', 'Group to access the collection management', 1, 1); +INSERT INTO `#REPLACEME#_user` (`id`, `login`, `password`, `name`, `active`, `apiToken`, `apiTokenValidDate`, `baseGroupId`, `protected`, `created`, `modificationuser`, `owner`, `group`, `rights`) VALUES +(1, 'admin', '$2y$10$BdLVGaeiQc12smmNKf4rk.2Dj6ockECsSlpx1eO7RWN3RbX2gYrai', 'Administrator', 1, NULL, NULL, 1, 1, '2019-09-01 17:22:02', 0, 1, 1, 'rwxr-----'), +(2, 'anonymoose', '', 'Anonymoose', 1, NULL, NULL, 3, 1, '2020-05-03 17:22:02', 0, 2, 3, 'rwxr--r--'); -- -------------------------------------------------------- -- --- Table structure for table `bib_user` +-- Table structure for table `#REPLACEME#_user2group` -- -DROP TABLE IF EXISTS `bib_user`; -CREATE TABLE `bib_user` ( - `id` int(10) NOT NULL, - `login` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, - `password` varchar(40) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', - `name` varchar(64) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', - `active` int(10) NOT NULL DEFAULT '1', - `email` varchar(128) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', - `baseGroupId` int(10) NOT NULL DEFAULT '0', - `protected` tinyint(1) NOT NULL DEFAULT '0', - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; +DROP TABLE IF EXISTS `#REPLACEME#_user2group`; +CREATE TABLE `#REPLACEME#_user2group` ( + `fk_user_id` int NOT NULL DEFAULT '0', + `fk_group_id` int NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- --- Dumping data for table `bib_user` +-- Dumping data for table `#REPLACEME#_user2group` -- -INSERT INTO `bib_user` (`id`, `login`, `password`, `name`, `active`, `email`, `baseGroupId`, `protected`, `created`) VALUES -(1, 'admin', 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 'Banana', 1, 'mail@bananas-playground.net', 1, 1, '2019-09-01 17:22:02'), -(2, 'bibuser', '', 'Mr. Gast', 1, 'test@test.com', 2, 1, '2019-09-01 17:22:02'); +INSERT INTO `#REPLACEME#_user2group` (`fk_user_id`, `fk_group_id`) VALUES +(1, 1), +(2, 3); -- -------------------------------------------------------- -- --- Table structure for table `bib_user2group` +-- Table structure for table `#REPLACEME#_userSession` -- -DROP TABLE IF EXISTS `bib_user2group`; -CREATE TABLE `bib_user2group` ( - `fk_user_id` int(10) NOT NULL DEFAULT '0', - `fk_group_id` int(10) NOT NULL DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; +DROP TABLE IF EXISTS `#REPLACEME#_userSession`; +CREATE TABLE `#REPLACEME#_userSession` ( + `fk_user_id` int NOT NULL, + `loginTime` datetime NOT NULL, + `area` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '', + `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `salt` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- --- Dumping data for table `bib_user2group` +-- Dumping data for table `#REPLACEME#_userSession` -- -INSERT INTO `bib_user2group` (`fk_user_id`, `fk_group_id`) VALUES -(1, 1), -(2, 2); - -- -- Indexes for dumped tables -- -- --- Indexes for table `bib_collection` +-- Indexes for table `#REPLACEME#_collection` -- -ALTER TABLE `bib_collection` +ALTER TABLE `#REPLACEME#_collection` ADD PRIMARY KEY (`id`); -- --- Indexes for table `bib_collection_entry_1` +-- Indexes for table `#REPLACEME#_group` -- -ALTER TABLE `bib_collection_entry_1` +ALTER TABLE `#REPLACEME#_group` ADD PRIMARY KEY (`id`); -- --- Indexes for table `bib_collection_field_1` +-- Indexes for table `#REPLACEME#_menu` -- -ALTER TABLE `bib_collection_field_1` +ALTER TABLE `#REPLACEME#_menu` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `#REPLACEME#_sys_fields` +-- +ALTER TABLE `#REPLACEME#_sys_fields` ADD PRIMARY KEY (`id`) USING BTREE; -- --- Indexes for table `bib_collection_lookup_1` +-- Indexes for table `#REPLACEME#_tool` -- -ALTER TABLE `bib_collection_lookup_1` - ADD PRIMARY KEY (`id`); +ALTER TABLE `#REPLACEME#_tool` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `action` (`action`); -- --- Indexes for table `bib_group` +-- Indexes for table `#REPLACEME#_tool2collection` -- -ALTER TABLE `bib_group` - ADD PRIMARY KEY (`id`); +ALTER TABLE `#REPLACEME#_tool2collection` + ADD UNIQUE KEY `fk_collection_id` (`fk_collection_id`,`fk_tool_id`); -- --- Indexes for table `bib_user` +-- Indexes for table `#REPLACEME#_user` -- -ALTER TABLE `bib_user` - ADD PRIMARY KEY (`id`); +ALTER TABLE `#REPLACEME#_user` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `login` (`login`); -- --- Indexes for table `bib_user2group` +-- Indexes for table `#REPLACEME#_user2group` -- -ALTER TABLE `bib_user2group` +ALTER TABLE `#REPLACEME#_user2group` ADD PRIMARY KEY (`fk_user_id`,`fk_group_id`); +-- +-- Indexes for table `#REPLACEME#_userSession` +-- +ALTER TABLE `#REPLACEME#_userSession` + ADD PRIMARY KEY (`area`); + -- -- AUTO_INCREMENT for dumped tables -- -- --- AUTO_INCREMENT for table `bib_collection` +-- AUTO_INCREMENT for table `#REPLACEME#_collection` -- -ALTER TABLE `bib_collection` - MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +ALTER TABLE `#REPLACEME#_collection` + MODIFY `id` int NOT NULL AUTO_INCREMENT; -- --- AUTO_INCREMENT for table `bib_collection_entry_1` +-- AUTO_INCREMENT for table `#REPLACEME#_group` -- -ALTER TABLE `bib_collection_entry_1` - MODIFY `id` int(10) NOT NULL AUTO_INCREMENT; +ALTER TABLE `#REPLACEME#_group` + MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- --- AUTO_INCREMENT for table `bib_collection_field_1` +-- AUTO_INCREMENT for table `#REPLACEME#_menu` -- -ALTER TABLE `bib_collection_field_1` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18; +ALTER TABLE `#REPLACEME#_menu` + MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; -- --- AUTO_INCREMENT for table `bib_collection_lookup_1` +-- AUTO_INCREMENT for table `#REPLACEME#_sys_fields` -- -ALTER TABLE `bib_collection_lookup_1` - MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; +ALTER TABLE `#REPLACEME#_sys_fields` + MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26; -- --- AUTO_INCREMENT for table `bib_group` +-- AUTO_INCREMENT for table `#REPLACEME#_tool` -- -ALTER TABLE `bib_group` - MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; +ALTER TABLE `#REPLACEME#_tool` + MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- --- AUTO_INCREMENT for table `bib_user` +-- AUTO_INCREMENT for table `#REPLACEME#_user` -- -ALTER TABLE `bib_user` - MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +ALTER TABLE `#REPLACEME#_user` + MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/documentation/setup/install.txt b/documentation/setup/install.txt index 2683cd0..55b3e9f 100644 --- a/documentation/setup/install.txt +++ b/documentation/setup/install.txt @@ -1 +1,36 @@ +1. Unpack +Unpack the archive in a temp folder. Follow the steps. After you can delete the +unpacked files + +2. DB Setup +Create a DB and choose a prefix (A _ is added automatically as separation) for your tables. +Open the provided sql file. Search for #REPLACEME# and replace it with your table prefix. +Save. Import this file into you newly created DB. + +3. Config +Copy webclient/config/database.php.default to webclient/config/database.php +Edit and fill in the DB details. + +Copy webclient/config/path.php.default to webclient/config/path.php +Edit the file. Minimum is to change PATH_ABSOLUTE to you installation path and +PATH_WEB_STORAGE relative to your webroot. +If you change the other settings you need to change the folders too. + +Copy webclient/config/system.php.default to webclient/config/system.php +No need to change anything unless you know what and why. + +4. Move files +Move the content of webclient folder to your webspace. Make sure the location matches +the PATH_ABSOLUTE config in path.php file + +5. File rights +Make sure that systemout folder is read/write accessible with your webserver user. Recursive. +Make sure that storage folder is read/write accessible with your webserver user. Recursive. + +6. Access +Open your browser and visit your newly created bibliotheca installation. Default admin user pw: test + +7. First steps +Create your own user. +Create your first collection. diff --git a/webclient/config/database.php.default b/webclient/config/database.php.default index 450bcfd..0c827f3 100644 --- a/webclient/config/database.php.default +++ b/webclient/config/database.php.default @@ -21,4 +21,4 @@ define('DB_HOST','127.0.0.1'); define('DB_USERNAME','user'); define('DB_PASSWORD','test'); define('DB_NAME','bibliotheca'); -define('DB_PREFIX','bib'); # a _ is added automatically as seperation +define('DB_PREFIX','bib'); # a _ is added automatically as separation diff --git a/webclient/systemout/.gitignore b/webclient/systemout/.gitignore index d6b7ef3..0f482c8 100644 --- a/webclient/systemout/.gitignore +++ b/webclient/systemout/.gitignore @@ -1,2 +1,4 @@ -* -!.gitignore +*.log +cache +cast +posters diff --git a/webclient/systemout/session/.gitignore b/webclient/systemout/session/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/webclient/systemout/session/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore