bibliotheca.sql.default 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  2. START TRANSACTION;
  3. SET time_zone = "+00:00";
  4. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  5. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  6. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  7. /*!40101 SET NAMES utf8mb4 */;
  8. --
  9. -- Database: `bibliotheca`
  10. --
  11. -- --------------------------------------------------------
  12. --
  13. -- Table structure for table `#REPLACEME#_collection`
  14. --
  15. DROP TABLE IF EXISTS `#REPLACEME#_collection`;
  16. CREATE TABLE `#REPLACEME#_collection` (
  17. `id` int NOT NULL,
  18. `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  19. `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  20. `defaultSearchField` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  21. `defaultSortField` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  22. `defaultSortOrder` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  23. `advancedSearchTableFields` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  24. `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  25. `modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  26. `modificationuser` int DEFAULT NULL,
  27. `owner` int NOT NULL,
  28. `group` int NOT NULL,
  29. `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
  30. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  31. -- --------------------------------------------------------
  32. --
  33. -- Table structure for table `#REPLACEME#_group`
  34. --
  35. DROP TABLE IF EXISTS `#REPLACEME#_group`;
  36. CREATE TABLE `#REPLACEME#_group` (
  37. `id` int NOT NULL,
  38. `name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  39. `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  40. `protected` tinyint(1) NOT NULL DEFAULT '0',
  41. `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  42. `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  43. `modificationuser` int DEFAULT NULL,
  44. `owner` int NOT NULL,
  45. `group` int NOT NULL,
  46. `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
  47. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  48. --
  49. -- Dumping data for table `#REPLACEME#_group`
  50. --
  51. INSERT INTO `#REPLACEME#_group` (`id`, `name`, `description`, `protected`, `created`, `modified`, `modificationuser`, `owner`, `group`, `rights`) VALUES
  52. (1, 'Administration', 'Admin group', 1, '2020-05-31 21:25:29', '2021-01-02 19:56:10', 0, 1, 1, 'rwx------'),
  53. (2, 'Users', 'Default user group', 1, '2020-05-31 21:25:29', '2021-01-02 19:56:10', 0, 1, 1, 'rwxr--r--'),
  54. (3, 'Anonymous', 'Anonymous users', 1, '2020-05-31 21:25:29', '2021-01-02 19:56:10', 0, 1, 1, 'rwxr--r--');
  55. -- --------------------------------------------------------
  56. --
  57. -- Table structure for table `#REPLACEME#_menu`
  58. --
  59. DROP TABLE IF EXISTS `#REPLACEME#_menu`;
  60. CREATE TABLE `#REPLACEME#_menu` (
  61. `id` int UNSIGNED NOT NULL,
  62. `text` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  63. `action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  64. `contextaction` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  65. `icon` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  66. `owner` int NOT NULL DEFAULT '0',
  67. `group` int NOT NULL DEFAULT '0',
  68. `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  69. `position` int NOT NULL DEFAULT '0',
  70. `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
  71. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  72. --
  73. -- Dumping data for table `#REPLACEME#_menu`
  74. --
  75. INSERT INTO `bib_menu` (`id`, `text`, `action`, `contextaction`, `icon`, `owner`, `group`, `rights`, `position`, `category`) VALUES
  76. (1, 'menu.show.dashboard', 'dashboard', '', 'home', 1, 1, 'rw-r--r--', 0, 'show'),
  77. (2, 'menu.show.collections', 'collections', '', 'database', 1, 1, 'rw-r--r--', 1, 'show'),
  78. (3, 'menu.show.tags', 'tags', '', 'tag', 1, 1, 'rw-r--r--', 2, 'show'),
  79. (4, 'menu.manage.add', 'manageentry', 'collection', 'plus-circle', 1, 2, 'rw-rw----', 0, 'manage'),
  80. (6, 'menu.manage.tags', 'managetags', 'collection', 'tag', 1, 2, 'rw-rw----', 2, 'manage'),
  81. (7, 'menu.manage.collections', 'managecolletions', '', 'database', 1, 2, 'rw-rw----', 3, 'manage'),
  82. (8, 'menu.manage.users', 'manageusers', '', 'users', 1, 1, 'rw-------', 4, 'manage'),
  83. (9, 'Login', 'auth', '', '', 1, 1, 'rw-r--r--', 0, ''),
  84. (10, 'Collection fields', 'managecollectionfields', '', '', 1, 2, 'rw-rw----', 0, ''),
  85. (11, 'Entry', 'entry', '', '', 1, 1, 'rw-r--r--', 0, ''),
  86. (12, 'Search', 'search', '', '', 1, 1, 'rw-r--r--', 0, ''),
  87. (14, 'Tool', 'tool', '', '', 1, 2, 'rw-rw----', 0, ''),
  88. (15, 'Advanced search', 'advancedsearch', '', '', 1, 1, 'rw-r--r--', 0, ''),
  89. (16, 'menu.manage.profile', 'profile', '', 'user', 1, 2, 'rw-rw----', 6, 'manage'),
  90. (17, 'menu.manage.groups', 'managegroups', '', 'users', 1, 1, 'rw-------', 5, 'manage'),
  91. (18, 'Bulkedit', 'bulkedit', '', '', 1, 2, 'rw-rw----', 0, ''),
  92. (19, 'menu.show.sysinfo', 'sysinfo', '', 'info', 1, 1, 'rw-------', 3, 'show');
  93. -- --------------------------------------------------------
  94. --
  95. -- Table structure for table `#REPLACEME#_sys_fields`
  96. --
  97. DROP TABLE IF EXISTS `#REPLACEME#_sys_fields`;
  98. CREATE TABLE `#REPLACEME#_sys_fields` (
  99. `id` int NOT NULL,
  100. `identifier` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  101. `displayname` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  102. `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  103. `searchtype` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  104. `createstring` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  105. `inputValidation` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  106. `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  107. `apiinfo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  108. `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  109. `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  110. `modificationuser` int DEFAULT NULL,
  111. `owner` int NOT NULL,
  112. `group` int NOT NULL,
  113. `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
  114. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  115. --
  116. -- Dumping data for table `#REPLACEME#_sys_fields`
  117. --
  118. INSERT INTO `#REPLACEME#_sys_fields` (`id`, `identifier`, `displayname`, `type`, `searchtype`, `createstring`, `inputValidation`, `value`, `apiinfo`, `created`, `modified`, `modificationuser`, `owner`, `group`, `rights`) VALUES
  119. (1, 'title', 'sysfield.title', 'text', 'entryText', '`title` varchar(128) NOT NULL, ADD FULLTEXT (`title`)', '', NULL, 'string 128', '2019-09-01 18:26:33', '2024-04-20 07:44:10', 0, 1, 1, 'rw-r--r--'),
  120. (2, 'description', 'sysfield.description', 'text3', 'entryText', '`description` varchar(255) NULL DEFAULT NULL, ADD FULLTEXT (`description`)', '', NULL, 'string 255', '2019-09-01 18:28:35', '2024-04-20 07:45:18', 0, 1, 1, 'rw-r--r--'),
  121. (3, 'content', 'sysfield.content', 'textarea', 'entryText', '`content` text NULL DEFAULT NULL, ADD FULLTEXT (`content`)', '', NULL, 'mysql text', '2019-09-01 18:28:35', '2024-04-20 07:46:05', 0, 1, 1, 'rw-r--r--'),
  122. (5, 'tag', 'sysfield.tag', 'lookupmultiple', 'tag', NULL, '', NULL, 'string 64', '2019-09-01 19:11:18', '2024-04-20 07:46:35', 0, 1, 1, 'rw-r--r--'),
  123. (6, 'category', 'sysfield.category', 'lookupmultiple', 'tag', NULL, '', NULL, 'string 64', '2019-09-01 19:11:18', '2024-04-20 07:47:26', 0, 1, 1, 'rw-r--r--'),
  124. (7, 'publisher', 'sysfield.publisher', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2019-09-01 19:17:51', '2024-04-20 07:47:45', 0, 1, 1, 'rw-r--r--'),
  125. (8, 'developer', 'sysfield.developer', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2019-09-01 19:17:51', '2024-04-20 07:48:07', 0, 1, 1, 'rw-r--r--'),
  126. (9, 'platform', 'sysfield.platform', 'selection', 'entrySingleText', '`platform` varchar(32) NULL DEFAULT NULL', '', 'Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X', 'One of Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X', '2019-09-01 19:18:33', '2024-04-20 07:48:32', 0, 1, 1, 'rw-r--r--'),
  127. (10, 'storage', 'sysfield.storage', 'lookupmultiple', 'tag', NULL, '', NULL, 'string 64', '2019-09-01 19:18:33', '2024-04-20 07:48:56', 0, 1, 1, 'rw-r--r--'),
  128. (13, 'rating', 'sysfield.rating', 'selection', 'entrySingleText', '`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', '2024-04-20 07:49:22', 0, 1, 1, 'rw-r--r--'),
  129. (14, 'year', 'sysfield.year', 'year', 'entrySingleNum', '`year` int(10) NULL, ADD INDEX (`year`)', '', NULL, 'int 10', '2019-09-01 19:30:11', '2024-04-20 07:49:37', 0, 1, 1, 'rw-r--r--'),
  130. (15, 'coverimage', 'sysfield.coverimage', 'upload', NULL, NULL, '', NULL, 'One file in $_FILES[uploads] of post', '2019-09-01 19:48:44', '2024-04-20 07:49:59', 0, 1, 1, 'rw-r--r--'),
  131. (16, 'attachment', 'sysfield.attachment', 'upload_multiple', NULL, NULL, '', NULL, 'Multiple in $_FILES[uploads] of post', '2019-09-01 19:48:44', '2024-04-20 07:50:35', 0, 1, 1, 'rw-r--r--'),
  132. (17, 'os', 'sysfield.os', 'selection', 'entrySingleNum', '`os` varchar(32) NULL DEFAULT NULL', '', 'DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 98,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', 'One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 98,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', '2019-09-01 19:55:13', '2024-04-20 07:51:07', 0, 1, 1, 'rw-r--r--'),
  133. (18, 'actors', 'sysfield.actors', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2020-07-26 07:12:48', '2024-04-20 07:51:30', NULL, 1, 1, 'rw-r--r--'),
  134. (19, 'countries', 'sysfield.countries', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2020-07-26 07:16:08', '2024-04-20 07:52:01', NULL, 1, 1, 'rw-r--r--'),
  135. (20, 'directors', 'sysfield.directors', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2020-07-26 07:17:59', '2024-04-20 07:52:23', NULL, 1, 1, 'rw-r--r--'),
  136. (21, 'genres', 'sysfield.genres', 'lookupmultiple', 'tag', NULL, '', NULL, 'string 64', '2020-07-26 07:18:55', '2024-04-20 07:52:44', NULL, 1, 1, 'rw-r--r--'),
  137. (22, 'languages', 'sysfield.languages', 'lookupmultiple', 'tag', NULL, '', NULL, 'string 64', '2020-07-26 07:20:45', '2024-04-20 07:53:17', NULL, 1, 1, 'rw-r--r--'),
  138. (23, 'runtime', 'sysfield.runtime', 'number', 'entrySingleNum', '`runtime` int(10) NULL, ADD INDEX (`runtime`)', '', NULL, 'int 10', '2020-07-26 07:22:24', '2024-04-20 07:53:40', NULL, 1, 1, 'rw-r--r--'),
  139. (24, 'imdbrating', 'sysfield.imdbrating', 'text', 'entrySingleText', '`imdbrating` varchar(128) NULL DEFAULT NULL', '', NULL, 'string 128', '2020-12-27 10:00:33', '2024-04-20 07:54:05', 0, 1, 1, 'rw-r--r--'),
  140. (25, 'viewcount', 'sysfield.viewcount', 'number', 'entrySingleNum', '`viewcount` int(10) NULL, ADD INDEX (`viewcount`)', '', NULL, 'int 10', '2020-12-27 10:41:10', '2024-04-20 07:54:29', 0, 1, 1, 'rw-r--r--'),
  141. (26, 'writers', 'sysfield.writers', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2021-01-05 09:47:20', '2024-04-20 07:54:53', NULL, 1, 1, 'rw-r--r--'),
  142. (27, 'localizedTitle', 'sysfield.localizedTitle', 'text', 'entryText', '`localizedTitle` varchar(128) NULL DEFAULT NULL, ADD FULLTEXT (`localizedTitle`)', '', NULL, 'string 128', '2021-04-25 19:33:31', '2024-04-20 07:55:22', 0, 1, 1, 'rw-r--r--'),
  143. (28, 'gameEngine', 'sysfield.gameEngine', 'text', 'entryText', '`gameEngine` varchar(128) NOT NULL, ADD FULLTEXT (`gameEngine`)', '', NULL, 'string 128', '2021-04-25 21:21:37', '2024-04-20 07:55:44', 0, 1, 1, 'rw-r--r--'),
  144. (29, 'view', 'sysfield.view', 'selection', 'entrySingleNum', '`view` varchar(32) NULL DEFAULT NULL', '', 'First person,Third person,Top-down', 'First person,Third person,Top-down', '2021-04-25 21:21:45', '2024-04-20 07:56:12', 0, 1, 1, 'rw-r--r--'),
  145. (30, 'sysReq', 'sysfield.sysReq', 'text3', 'entryText', '`sysReq` varchar(255) NULL DEFAULT NULL, ADD FULLTEXT (`sysReq`)', '', NULL, 'string 255', '2021-04-25 21:21:54', '2024-04-20 07:56:36', 0, 1, 1, 'rw-r--r--'),
  146. (31, 'artist', 'sysfield.artist', 'text', 'entrySingleText', '`artist` varchar(128) NULL DEFAULT NULL', '', NULL, 'string 128', '2021-07-09 08:30:11', '2024-04-20 07:56:57', NULL, 1, 1, 'rw-r--r--'),
  147. (32, 'artists', 'sysfield.artists', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2021-07-18 11:42:16', '2024-04-20 07:57:49', NULL, 1, 1, 'rw-r--r--'),
  148. (34, 'isbn', 'sysfield.isbn', 'text', 'entrySingleText', '`isbn` varchar(32) NULL, ADD INDEX (`isbn`)', '', NULL, 'varchar 32', '2022-10-08 10:47:01', '2024-04-20 07:57:26', NULL, 1, 1, 'rw-r--r--'),
  149. (35, 'combSearch', 'Combined Search', 'hidden', 'entryText', '`combSearch` text NULL DEFAULT NULL, ADD FULLTEXT (`combSearch`)', '', NULL, 'mysql text - Content will be auto generated from other entry fields', '2024-01-28 09:56:32', '2024-01-28 11:21:51', NULL, 1, 1, 'rw-r--r--');
  150. -- --------------------------------------------------------
  151. --
  152. -- Table structure for table `#REPLACEME#_tool`
  153. --
  154. DROP TABLE IF EXISTS `#REPLACEME#_tool`;
  155. CREATE TABLE `#REPLACEME#_tool` (
  156. `id` int NOT NULL,
  157. `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  158. `description` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  159. `action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  160. `target` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  161. `owner` int NOT NULL,
  162. `group` int NOT NULL,
  163. `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
  164. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  165. --
  166. -- Dumping data for table `#REPLACEME#_tool`
  167. --
  168. INSERT INTO `#REPLACEME#_tool` (`id`, `name`, `description`, `action`, `target`, `owner`, `group`, `rights`) VALUES
  169. (1, 'IMDB web', 'Web parser', 'imdbweb', '_self', 1, 1, 'rw-r--r--'),
  170. (2, 'Game infos', 'Game infos', 'gameinfo', '_self', 1, 1, 'rw-r--r--'),
  171. (3, 'Musicbrainz', 'Album infos', 'musicbrainz', '_self', 1, 1, 'rw-r--r--'),
  172. (4, 'Google Books', 'Book infos from Google', 'googlebooks', '_self', 1, 1, 'rw-r--r--');
  173. -- --------------------------------------------------------
  174. --
  175. -- Table structure for table `#REPLACEME#_tool2collection`
  176. --
  177. DROP TABLE IF EXISTS `#REPLACEME#_tool2collection`;
  178. CREATE TABLE `#REPLACEME#_tool2collection` (
  179. `fk_tool_id` int NOT NULL,
  180. `fk_collection_id` int NOT NULL
  181. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  182. -- --------------------------------------------------------
  183. --
  184. -- Table structure for table `#REPLACEME#_user`
  185. --
  186. DROP TABLE IF EXISTS `#REPLACEME#_user`;
  187. CREATE TABLE `#REPLACEME#_user` (
  188. `id` int NOT NULL,
  189. `login` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  190. `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  191. `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  192. `active` int NOT NULL DEFAULT '1',
  193. `apiToken` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  194. `apiTokenValidDate` timestamp NULL DEFAULT NULL,
  195. `baseGroupId` int NOT NULL DEFAULT '0',
  196. `protected` tinyint(1) NOT NULL DEFAULT '0',
  197. `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  198. `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  199. `modificationuser` int DEFAULT NULL,
  200. `owner` int NOT NULL,
  201. `group` int NOT NULL,
  202. `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
  203. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  204. --
  205. -- Dumping data for table `#REPLACEME#_user`
  206. --
  207. INSERT INTO `#REPLACEME#_user` (`id`, `login`, `password`, `name`, `active`, `apiToken`, `apiTokenValidDate`, `baseGroupId`, `protected`, `created`, `modified`, `modificationuser`, `owner`, `group`, `rights`) VALUES
  208. (1, 'admin', '$2y$10$BdLVGaeiQc12smmNKf4rk.2Dj6ockECsSlpx1eO7RWN3RbX2gYrai', 'Administrator', 1, NULL, NULL, 1, 1, '2019-09-01 17:22:02', '2021-01-02 19:56:10', 0, 1, 1, 'rwxr-----'),
  209. (2, 'anonymoose', '', 'Anonymoose', 1, NULL, NULL, 3, 1, '2020-05-03 17:22:02', '2021-01-02 19:56:10', 0, 2, 3, 'rwxr--r--');
  210. -- --------------------------------------------------------
  211. --
  212. -- Table structure for table `#REPLACEME#_user2group`
  213. --
  214. DROP TABLE IF EXISTS `#REPLACEME#_user2group`;
  215. CREATE TABLE `#REPLACEME#_user2group` (
  216. `fk_user_id` int NOT NULL DEFAULT '0',
  217. `fk_group_id` int NOT NULL DEFAULT '0'
  218. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  219. --
  220. -- Dumping data for table `bib_user2group`
  221. --
  222. INSERT INTO `bib_user2group` (`fk_user_id`, `fk_group_id`) VALUES
  223. (1, 1),
  224. (2, 3);
  225. -- --------------------------------------------------------
  226. --
  227. -- Table structure for table `#REPLACEME#_userSession`
  228. --
  229. DROP TABLE IF EXISTS `#REPLACEME#_userSession`;
  230. CREATE TABLE `#REPLACEME#_userSession` (
  231. `fk_user_id` int NOT NULL,
  232. `loginTime` datetime NOT NULL,
  233. `area` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  234. `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  235. `salt` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
  236. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  237. --
  238. -- Indexes for dumped tables
  239. --
  240. --
  241. -- Indexes for table `#REPLACEME#_collection`
  242. --
  243. ALTER TABLE `#REPLACEME#_collection`
  244. ADD PRIMARY KEY (`id`);
  245. --
  246. -- Indexes for table `#REPLACEME#_group`
  247. --
  248. ALTER TABLE `#REPLACEME#_group`
  249. ADD PRIMARY KEY (`id`);
  250. --
  251. -- Indexes for table `#REPLACEME#_menu`
  252. --
  253. ALTER TABLE `#REPLACEME#_menu`
  254. ADD PRIMARY KEY (`id`);
  255. --
  256. -- Indexes for table `#REPLACEME#_sys_fields`
  257. --
  258. ALTER TABLE `#REPLACEME#_sys_fields`
  259. ADD PRIMARY KEY (`id`) USING BTREE,
  260. ADD UNIQUE KEY `identifier` (`identifier`);
  261. --
  262. -- Indexes for table `#REPLACEME#_tool`
  263. --
  264. ALTER TABLE `#REPLACEME#_tool`
  265. ADD PRIMARY KEY (`id`),
  266. ADD UNIQUE KEY `action` (`action`);
  267. --
  268. -- Indexes for table `#REPLACEME#_tool2collection`
  269. --
  270. ALTER TABLE `#REPLACEME#_tool2collection`
  271. ADD UNIQUE KEY `fk_collection_id` (`fk_collection_id`,`fk_tool_id`);
  272. --
  273. -- Indexes for table `#REPLACEME#_user`
  274. --
  275. ALTER TABLE `#REPLACEME#_user`
  276. ADD PRIMARY KEY (`id`),
  277. ADD UNIQUE KEY `login` (`login`);
  278. --
  279. -- Indexes for table `#REPLACEME#_user2group`
  280. --
  281. ALTER TABLE `#REPLACEME#_user2group`
  282. ADD PRIMARY KEY (`fk_user_id`,`fk_group_id`);
  283. --
  284. -- Indexes for table `#REPLACEME#_userSession`
  285. --
  286. ALTER TABLE `#REPLACEME#_userSession`
  287. ADD PRIMARY KEY (`area`);
  288. --
  289. -- AUTO_INCREMENT for dumped tables
  290. --
  291. --
  292. -- AUTO_INCREMENT for table `#REPLACEME#_collection`
  293. --
  294. ALTER TABLE `#REPLACEME#_collection`
  295. MODIFY `id` int NOT NULL AUTO_INCREMENT;
  296. --
  297. -- AUTO_INCREMENT for table `#REPLACEME#_group`
  298. --
  299. ALTER TABLE `#REPLACEME#_group`
  300. MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  301. --
  302. -- AUTO_INCREMENT for table `#REPLACEME#_menu`
  303. --
  304. ALTER TABLE `#REPLACEME#_menu`
  305. MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
  306. --
  307. -- AUTO_INCREMENT for table `#REPLACEME#_sys_fields`
  308. --
  309. ALTER TABLE `#REPLACEME#_sys_fields`
  310. MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;
  311. --
  312. -- AUTO_INCREMENT for table `#REPLACEME#_tool`
  313. --
  314. ALTER TABLE `#REPLACEME#_tool`
  315. MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  316. --
  317. -- AUTO_INCREMENT for table `#REPLACEME#_user`
  318. --
  319. ALTER TABLE `#REPLACEME#_user`
  320. MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  321. COMMIT;
  322. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  323. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  324. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;