Skip to content

Commit 2e5ae82

Browse files
author
Jakob Jünger
committed
Update schema, add version.txt
1 parent d02a951 commit 2e5ae82

File tree

3 files changed

+131
-180
lines changed

3 files changed

+131
-180
lines changed

config/schema/epigraf.sql

Lines changed: 129 additions & 179 deletions
Original file line numberDiff line numberDiff line change
@@ -1,183 +1,133 @@
1-
CREATE TABLE IF NOT EXISTS `databanks`
2-
(
3-
`id` int(11) NOT NULL AUTO_INCREMENT,
4-
`created` datetime DEFAULT NULL,
5-
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
6-
`name` varchar(200) NOT NULL COMMENT 'Name der Datenbank',
7-
`version` varchar(5) NOT NULL,
8-
`description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
9-
`published` tinyint(4) DEFAULT NULL,
10-
`iriprovider` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'Referenzdatenbank ja/nein',
11-
`iriprefix` varchar(50) DEFAULT NULL,
12-
PRIMARY KEY (`id`),
13-
KEY `name` (`name`)
14-
) ENGINE = InnoDB
15-
DEFAULT CHARSET = utf8mb4
16-
COLLATE = utf8mb4_unicode_ci;
17-
18-
CREATE TABLE IF NOT EXISTS `docs`
19-
(
20-
`id` int(11) NOT NULL AUTO_INCREMENT,
21-
`deleted` tinyint(4) NOT NULL DEFAULT 0,
22-
`version_id` int(11) DEFAULT NULL,
23-
`created` datetime DEFAULT NULL,
24-
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
25-
`published` tinyint(4) NOT NULL DEFAULT 0,
26-
`segment` char(10) DEFAULT 'wiki',
27-
`sortkey` varchar(50) DEFAULT '',
28-
`name` varchar(200) DEFAULT NULL,
29-
`category` varchar(300) DEFAULT NULL,
30-
`content` mediumtext DEFAULT NULL,
31-
`format` varchar(50) NOT NULL DEFAULT 'html',
32-
`norm_iri` varchar(50) DEFAULT NULL,
33-
PRIMARY KEY (`id`),
34-
KEY `norm_iri` (`norm_iri`) USING BTREE
35-
) ENGINE = InnoDB
36-
DEFAULT CHARSET = utf8mb4
37-
COLLATE = utf8mb4_unicode_ci;
38-
39-
CREATE TABLE IF NOT EXISTS `files`
40-
(
41-
`id` int(11) NOT NULL AUTO_INCREMENT,
42-
`deleted` int(11) NOT NULL DEFAULT 0,
43-
`published` int(11) NOT NULL DEFAULT 0,
44-
`created` datetime DEFAULT NULL,
45-
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
46-
`name` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
47-
`description` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
48-
`type` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
49-
`size` int(11) DEFAULT NULL,
50-
`root` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT 'root',
51-
`path` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
52-
`isfolder` tinyint(4) NOT NULL DEFAULT 0,
53-
PRIMARY KEY (`id`),
54-
KEY `published` (`published`)
55-
) ENGINE = MyISAM
56-
DEFAULT CHARSET = utf8mb4
57-
COLLATE = utf8mb4_unicode_ci;
58-
59-
CREATE TABLE IF NOT EXISTS `jobs`
60-
(
61-
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
62-
`created` datetime DEFAULT NULL,
63-
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
64-
`typ` varchar(100) NOT NULL COMMENT 'Typ',
65-
`status` varchar(50) NOT NULL COMMENT 'Status',
66-
`progress` int(11) NOT NULL DEFAULT 0,
67-
`progressmax` int(11) NOT NULL DEFAULT 0,
68-
`config` mediumtext DEFAULT NULL COMMENT 'Optionen',
69-
PRIMARY KEY (`id`)
70-
) ENGINE = InnoDB
71-
DEFAULT CHARSET = utf8mb4
72-
COLLATE = utf8mb4_unicode_ci;
73-
74-
CREATE TABLE IF NOT EXISTS `permissions`
75-
(
76-
`id` int(11) NOT NULL AUTO_INCREMENT,
77-
`created` datetime DEFAULT NULL,
78-
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
79-
`user_id` int(11) DEFAULT NULL,
80-
`user_session` int(11) DEFAULT NULL,
81-
`user_role` varchar(50) DEFAULT NULL,
82-
`user_request` varchar(50) DEFAULT NULL,
83-
`entity_type` varchar(50) DEFAULT NULL,
84-
`entity_name` varchar(50) DEFAULT NULL,
85-
`entity_id` int(11) DEFAULT NULL,
86-
`permission_type` varchar(200) DEFAULT NULL COMMENT 'Name der Berechtigung',
87-
`permission_name` varchar(200) DEFAULT NULL,
88-
`permission_expires` datetime DEFAULT NULL,
89-
PRIMARY KEY (`id`),
90-
KEY `user_id` (`user_id`),
91-
KEY `entity_type_entity_id_permission_type` (`entity_type`, `entity_id`, `permission_type`)
92-
) ENGINE = InnoDB
93-
DEFAULT CHARSET = utf8mb4
94-
COLLATE = utf8mb4_unicode_ci;
1+
CREATE TABLE IF NOT EXISTS `databanks` (
2+
`id` int(11) NOT NULL AUTO_INCREMENT,
3+
`created` datetime DEFAULT NULL,
4+
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
5+
`created_by` int(11) DEFAULT NULL,
6+
`modified_by` int(11) DEFAULT NULL,
7+
`name` varchar(200) NOT NULL,
8+
`version` varchar(5) NOT NULL,
9+
`category` varchar(200) DEFAULT NULL,
10+
`description` mediumtext DEFAULT NULL,
11+
`published` tinyint(4) DEFAULT NULL,
12+
`iriprefix` varchar(50) DEFAULT NULL,
13+
PRIMARY KEY (`id`),
14+
KEY `name` (`name`)
15+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
16+
17+
CREATE TABLE IF NOT EXISTS `docs` (
18+
`id` int(11) NOT NULL AUTO_INCREMENT,
19+
`deleted` tinyint(4) NOT NULL DEFAULT 0,
20+
`version_id` int(11) DEFAULT NULL,
21+
`created` datetime DEFAULT NULL,
22+
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
23+
`created_by` int(11) DEFAULT NULL,
24+
`modified_by` int(11) DEFAULT NULL,
25+
`published` tinyint(4) NOT NULL DEFAULT 0,
26+
`menu` tinyint(4) NOT NULL DEFAULT 1,
27+
`segment` char(10) DEFAULT 'wiki',
28+
`sortkey` varchar(50) DEFAULT '',
29+
`name` varchar(200) DEFAULT NULL,
30+
`category` varchar(300) DEFAULT NULL,
31+
`content` mediumtext DEFAULT NULL,
32+
`format` varchar(50) NOT NULL DEFAULT 'html',
33+
`norm_iri` varchar(1500) DEFAULT NULL,
34+
PRIMARY KEY (`id`),
35+
KEY `norm_iri` (`norm_iri`) USING BTREE
36+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
37+
38+
CREATE TABLE IF NOT EXISTS `files` (
39+
`id` int(11) NOT NULL AUTO_INCREMENT,
40+
`deleted` int(11) NOT NULL DEFAULT 0,
41+
`published` int(11) NOT NULL DEFAULT 0,
42+
`created` datetime DEFAULT NULL,
43+
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
44+
`created_by` int(11) DEFAULT NULL,
45+
`modified_by` int(11) DEFAULT NULL,
46+
`name` varchar(500) NOT NULL,
47+
`description` text DEFAULT NULL,
48+
`config` longtext DEFAULT NULL,
49+
`type` varchar(100) DEFAULT NULL,
50+
`size` int(11) DEFAULT NULL,
51+
`root` varchar(100) DEFAULT 'root',
52+
`path` varchar(500) DEFAULT NULL,
53+
`isfolder` tinyint(4) NOT NULL DEFAULT 0,
54+
PRIMARY KEY (`id`),
55+
KEY `published` (`published`)
56+
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
57+
58+
CREATE TABLE IF NOT EXISTS `jobs` (
59+
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
60+
`created` datetime DEFAULT NULL,
61+
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
62+
`created_by` int(11) DEFAULT NULL,
63+
`modified_by` int(11) DEFAULT NULL,
64+
`typ` varchar(100) NOT NULL,
65+
`status` varchar(50) NOT NULL,
66+
`progress` int(11) NOT NULL DEFAULT 0,
67+
`progressmax` int(11) NOT NULL DEFAULT 0,
68+
`config` text DEFAULT NULL,
69+
PRIMARY KEY (`id`)
70+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
71+
72+
CREATE TABLE IF NOT EXISTS `permissions` (
73+
`id` int(11) NOT NULL AUTO_INCREMENT,
74+
`created` datetime DEFAULT NULL,
75+
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
76+
`created_by` int(11) DEFAULT NULL,
77+
`modified_by` int(11) DEFAULT NULL,
78+
`user_id` int(11) DEFAULT NULL,
79+
`user_session` int(11) DEFAULT NULL,
80+
`user_role` varchar(50) DEFAULT NULL,
81+
`user_request` varchar(50) DEFAULT NULL,
82+
`entity_type` varchar(50) DEFAULT NULL,
83+
`entity_name` varchar(50) DEFAULT NULL,
84+
`entity_id` int(11) DEFAULT NULL,
85+
`permission_type` varchar(200) DEFAULT NULL,
86+
`permission_name` varchar(200) DEFAULT NULL,
87+
`permission_expires` datetime DEFAULT NULL,
88+
PRIMARY KEY (`id`),
89+
KEY `user_id` (`user_id`),
90+
KEY `entity_type_entity_id_permission_type` (`entity_type`,`entity_id`,`permission_type`)
91+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
9592

9693
CREATE TABLE IF NOT EXISTS `pipelines` (
97-
`id` INT(11) NOT NULL AUTO_INCREMENT,
98-
`deleted` TINYINT(4) NOT NULL DEFAULT '0',
99-
`published` TINYINT(4) NULL DEFAULT NULL,
100-
`version_id` INT(11) NULL DEFAULT NULL,
101-
`created` DATETIME NULL DEFAULT NULL,
102-
`modified` DATETIME NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
103-
`created_by` INT(11) NULL DEFAULT NULL,
104-
`modified_by` INT(11) NULL DEFAULT NULL,
105-
`name` VARCHAR(200) NOT NULL COMMENT 'Name der Pipeline' COLLATE 'utf8mb4_general_ci',
106-
`norm_iri` VARCHAR(1500) NOT NULL COLLATE 'utf8mb4_general_ci',
107-
`description` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
108-
`tasks` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
109-
PRIMARY KEY (`id`) USING BTREE
110-
)
111-
DEFAULT CHARSET = utf8mb4
112-
COLLATE='utf8mb4_general_ci'
113-
ENGINE=InnoDB;
114-
94+
`id` int(11) NOT NULL AUTO_INCREMENT,
95+
`deleted` tinyint(4) NOT NULL DEFAULT 0,
96+
`published` tinyint(4) DEFAULT NULL,
97+
`version_id` int(11) DEFAULT NULL,
98+
`created` datetime DEFAULT NULL,
99+
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
100+
`created_by` int(11) DEFAULT NULL,
101+
`modified_by` int(11) DEFAULT NULL,
102+
`name` varchar(200) NOT NULL,
103+
`norm_iri` varchar(1500) NOT NULL,
104+
`description` text DEFAULT NULL,
105+
`tasks` text DEFAULT NULL,
106+
PRIMARY KEY (`id`)
107+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
115108

116109
CREATE TABLE IF NOT EXISTS `users` (
117-
`id` INT(11) NOT NULL AUTO_INCREMENT,
118-
`created` DATETIME NULL DEFAULT NULL,
119-
`modified` DATETIME NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
120-
`created_by` INT(11) NULL DEFAULT NULL,
121-
`modified_by` INT(11) NULL DEFAULT NULL,
122-
`lastaction` DATETIME NULL DEFAULT NULL,
123-
`username` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_general_ci',
124-
`password` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
125-
`email` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
126-
`name` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
127-
`acronym` VARCHAR(10) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
128-
`norm_iri` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
129-
`contact` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
130-
`accesstoken` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
131-
`role` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_general_ci',
132-
`databank_id` INT(11) NULL DEFAULT NULL,
133-
`pipeline_article_id` INT(11) NULL DEFAULT NULL,
134-
`pipeline_book_id` INT(11) NULL DEFAULT NULL,
135-
`settings` MEDIUMTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
136-
PRIMARY KEY (`id`) USING BTREE,
137-
UNIQUE INDEX `Username` (`username`) USING BTREE,
138-
UNIQUE INDEX `iri` (`norm_iri`) USING BTREE
139-
)
140-
ENGINE=InnoDB
141-
DEFAULT CHARSET = utf8mb4
142-
COLLATE='utf8mb4_general_ci';
143-
144-
145-
ALTER TABLE `databanks` DROP COLUMN `iriprovider`;
146-
UPDATE databanks SET published = 1 WHERE name ='epi_public';
147-
148-
ALTER TABLE `databanks`
149-
ADD COLUMN `created_by` int(11) DEFAULT NULL AFTER modified,
150-
ADD COLUMN `modified_by` int(11) DEFAULT NULL AFTER `created_by`;
151-
152-
ALTER TABLE `docs`
153-
ADD COLUMN `created_by` int(11) DEFAULT NULL AFTER modified,
154-
ADD COLUMN `modified_by` int(11) DEFAULT NULL AFTER `created_by`;
155-
156-
ALTER TABLE `files`
157-
ADD COLUMN `created_by` int(11) DEFAULT NULL AFTER modified,
158-
ADD COLUMN `modified_by` int(11) DEFAULT NULL AFTER `created_by`;
159-
160-
ALTER TABLE `jobs`
161-
ADD COLUMN `created_by` int(11) DEFAULT NULL AFTER modified,
162-
ADD COLUMN `modified_by` int(11) DEFAULT NULL AFTER `created_by`;
163-
164-
ALTER TABLE `permissions`
165-
ADD COLUMN `created_by` int(11) DEFAULT NULL AFTER modified,
166-
ADD COLUMN `modified_by` int(11) DEFAULT NULL AFTER `created_by`;
167-
168-
169-
ALTER TABLE `users`
170-
ADD COLUMN `created_by` int(11) DEFAULT NULL AFTER modified,
171-
ADD COLUMN `modified_by` int(11) DEFAULT NULL AFTER `created_by`;
172-
173-
ALTER TABLE `docs`
174-
CHANGE COLUMN `norm_iri` `norm_iri` VARCHAR(1500) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `format`;
175-
176-
ALTER TABLE `docs`
177-
ADD COLUMN `menu` TINYINT(4) NOT NULL DEFAULT 1 AFTER `published`;
178-
179-
ALTER TABLE `files`
180-
ADD COLUMN `config` LONGTEXT NULL AFTER `description`;
181-
182-
ALTER TABLE `databanks`
183-
ADD COLUMN `category` VARCHAR(200) NULL AFTER `version`;
110+
`id` int(11) NOT NULL AUTO_INCREMENT,
111+
`created` datetime DEFAULT NULL,
112+
`modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
113+
`created_by` int(11) DEFAULT NULL,
114+
`modified_by` int(11) DEFAULT NULL,
115+
`lastaction` datetime DEFAULT NULL,
116+
`username` varchar(50) NOT NULL,
117+
`password` varchar(255) NOT NULL,
118+
`email` varchar(255) DEFAULT NULL,
119+
`name` varchar(255) DEFAULT NULL,
120+
`acronym` varchar(10) DEFAULT NULL,
121+
`iri` varchar(255) DEFAULT NULL,
122+
`norm_iri` varchar(255) DEFAULT NULL,
123+
`contact` text DEFAULT NULL,
124+
`accesstoken` varchar(255) DEFAULT NULL,
125+
`role` varchar(50) NOT NULL,
126+
`databank_id` int(11) DEFAULT NULL,
127+
`pipeline_article_id` int(11) DEFAULT NULL,
128+
`pipeline_book_id` int(11) DEFAULT NULL,
129+
`settings` text DEFAULT NULL,
130+
PRIMARY KEY (`id`),
131+
UNIQUE KEY `username` (`username`),
132+
UNIQUE KEY `iri` (`norm_iri`) USING BTREE
133+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

plugins/Widgets/webroot/js/widgets.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Epigraf v5.0.0.99

0 commit comments

Comments
 (0)