· 8 years ago · May 24, 2018, 05:02 AM
1
2--
3-- Structura de tabel pentru tabelul `modules`
4--
5
6DROP TABLE IF EXISTS `modules`;
7CREATE TABLE IF NOT EXISTS `modules` (
8 `id` int(16) NOT NULL AUTO_INCREMENT,
9 `name` varchar(32) COLLATE utf8_swedish_ci NOT NULL,
10 `table` varchar(32) COLLATE utf8_swedish_ci NOT NULL,
11 `slug` varchar(32) COLLATE utf8_swedish_ci NOT NULL,
12 `parent_module_id` int(16) NOT NULL,
13 `field_uid` int(16) NOT NULL,
14 `field_slug` int(16) NOT NULL,
15 `field_parent` int(16) NOT NULL,
16 `field_orderby` int(16) NOT NULL,
17 `orderby_direction` enum('DESC','ASC') COLLATE utf8_swedish_ci NOT NULL DEFAULT 'DESC',
18 `management_width` varchar(8) COLLATE utf8_swedish_ci NOT NULL,
19 `type` varchar(255) COLLATE utf8_swedish_ci NOT NULL,
20 `locked` tinyint(1) NOT NULL,
21 `lock_records` tinyint(1) NOT NULL,
22 `core_module` tinyint(1) NOT NULL,
23 PRIMARY KEY (`id`)
24) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci AUTO_INCREMENT=67 ;
25
26--
27-- Salvarea datelor din tabel `modules`
28--
29
30INSERT INTO `modules` (`id`, `name`, `table`, `slug`, `parent_module_id`, `field_uid`, `field_slug`, `field_parent`, `field_orderby`, `orderby_direction`, `management_width`, `type`, `locked`, `lock_records`, `core_module`) VALUES
31(3, 'Modules', 'modules', 'modules', 0, 6, 14, 10, 14, 'ASC', '30%', 'module', 1, 1, 1),
32(4, 'Fields', 'modules_fields', 'fields', 3, 17, 20, 0, 19, 'DESC', '30%', 'module_field', 1, 1, 1),
33(5, 'Validation', 'modules_fields_validation', 'validation', 3, 39, 40, 0, 39, 'DESC', '30%', 'module_field_validation', 1, 1, 1),
34(62, 'Users', 'users', 'users', 0, 362, 370, 0, 0, 'DESC', '20%', 'user', 0, 0, 0),
35(63, 'Groups', 'users_groups', 'groups', 62, 375, 376, 0, 0, 'ASC', '20%', 'user_group', 0, 0, 0),
36(64, 'Meta', 'users_meta', 'meta', 62, 380, 381, 0, 0, 'DESC', '20%', 'user_meta', 0, 0, 0),
37(65, 'Backup', 'backups', 'backups', 0, 384, 386, 0, 0, 'DESC', '20%', 'backup', 0, 0, 0),
38(66, 'Messages', 'users_messages', 'messages', 62, 387, 388, 0, 389, 'DESC', '20%', 'user_message', 0, 0, 0);
39
40-- --------------------------------------------------------
41
42--
43-- Structura de tabel pentru tabelul `modules_fields`
44--
45
46DROP TABLE IF EXISTS `modules_fields`;
47CREATE TABLE IF NOT EXISTS `modules_fields` (
48 `id` int(16) NOT NULL AUTO_INCREMENT,
49 `order` tinyint(2) NOT NULL,
50 `module_id` int(32) NOT NULL,
51 `name` varchar(32) COLLATE utf8_swedish_ci NOT NULL,
52 `label` varchar(32) COLLATE utf8_swedish_ci NOT NULL,
53 `type` varchar(32) COLLATE utf8_swedish_ci NOT NULL,
54 `editable` tinyint(1) NOT NULL,
55 `display_width` varchar(8) COLLATE utf8_swedish_ci NOT NULL,
56 `tooltip` text COLLATE utf8_swedish_ci NOT NULL,
57 `fieldset` varchar(255) COLLATE utf8_swedish_ci NOT NULL,
58 `specific_search` tinyint(1) NOT NULL,
59 PRIMARY KEY (`id`)
60) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci AUTO_INCREMENT=394 ;
61
62--
63-- Salvarea datelor din tabel `modules_fields`
64--
65
66INSERT INTO `modules_fields` (`id`, `order`, `module_id`, `name`, `label`, `type`, `editable`, `display_width`, `tooltip`, `fieldset`, `specific_search`) VALUES
67(6, 1, 3, 'id', 'Id', 'id', 0, '10%', '', '', 0),
68(8, 3, 3, 'table', 'Table', '', 1, '', '', '', 0),
69(9, 6, 3, 'slug', 'Slug', '', 1, '', '', '', 0),
70(10, 7, 3, 'parent_module_id', 'Module Parent', 'module', 1, '', '', '', 0),
71(11, 8, 3, 'field_uid', 'Id field', 'module_field_current', 1, '', '', '', 0),
72(12, 12, 3, 'orderby_direction', 'Default order direction', 'orderby_direction', 1, '', '', '', 0),
73(13, 13, 3, 'management_width', 'Options field width', 'text_small', 1, '', '', '', 0),
74(14, 2, 3, 'name', 'Name', '', 1, '55%', '', '', 0),
75(15, 10, 3, 'field_parent', 'Parent field', 'module_field_current', 1, '', '', '', 0),
76(16, 9, 3, 'field_slug', 'Slug field', 'module_field_current', 1, '', '', '', 0),
77(25, 11, 3, 'field_orderby', 'Default order by field', 'module_field_current', 1, '', '', '', 0),
78(35, 9, 3, 'type', 'Type definition', '', 1, '', '', '', 0),
79(50, 10, 3, 'locked', 'Locked', 'yes_no', 1, '', '', '', 0),
80(94, 10, 3, 'core_module', 'Core module', 'yes_no', 1, '', '', '', 0),
81(91, 9, 3, 'lock_records', 'Lock Records', 'yes_no', 1, '', '', '', 0),
82(17, 1, 4, 'id', 'ID', 'id', 0, '10%', '', '', 0),
83(18, 3, 4, 'name', 'Name', '', 1, '', '', '', 0),
84(19, 6, 4, 'module_id', 'Module', 'module', 1, '30%', '', '', 1),
85(20, 2, 4, 'label', 'Label', '', 1, '30%', '', '', 0),
86(21, 5, 4, 'type', 'Type', 'type', 1, '', '', '', 0),
87(22, 8, 4, 'editable', 'Editable?', 'yes_no', 1, '', '', '', 0),
88(23, 7, 4, 'display_width', 'Display width', 'text_small', 1, '', '', '', 0),
89(34, 4, 4, 'order', 'Order', 'text_small', 1, '', '', '', 0),
90(312, 2, 4, 'tooltip', 'Tooltip', 'textarea_small', 1, '', '', '', 0),
91(321, 3, 4, 'fieldset', 'Fieldset', '', 1, '', 'Fields of the same fieldset will be grouped together', '', 0),
92(327, 10, 4, 'specific_search', 'Specific search', 'yes_no', 1, '', 'If selected this column will be given it''s own search field in forms', '', 0),
93(39, 1, 5, 'id', 'ID', 'id', 0, '10%', '', '', 0),
94(40, 2, 5, 'name', 'Rule Name', 'module_validation_rule', 1, '30%', '', '', 0),
95(43, 4, 5, 'field_id', 'Field', 'module_field', 1, '30%', '', '', 0),
96(362, 1, 62, 'id', 'ID', 'id', 0, '', '', '', 0),
97(363, 1, 62, 'email', 'Email', '', 1, '30%', '', '', 0),
98(364, 4, 62, 'password', 'Password', 'password', 1, '', '', '', 0),
99(365, 8, 62, 'lastlogin', 'Last login', 'datetime_static', 1, '', '', '', 0),
100(366, 12, 62, 'lastip', 'Last IP used', 'static', 1, '', '', '', 0),
101(367, 5, 62, 'group_id', 'User Group', 'user_group', 1, '', '', '', 0),
102(368, 11, 62, 'avatar', 'Profile image', 'file_image', 1, '', '', '', 0),
103(369, 7, 62, 'date_registered', 'Date registered', 'datetime_static', 1, '', '', '', 0),
104(370, 1, 62, 'display_name', 'Display name', '', 1, '', '', '', 0),
105(371, 5, 62, 'temporary_password', 'Temporary password', '', 0, '', '', '', 0),
106(372, 12, 62, 'facebook_id', 'Facebook ID', 'static', 1, '', 'If the user has linked their account with Facebook or uses Facebook to login, this is their Facebook account ID.', '', 0),
107(373, 13, 62, 'twitter_id', 'Twitter ID', 'static', 1, '', 'If the user has linked their account with Twitter or uses Twitter to login, this is their Twitter account ID.', '', 0),
108(374, 3, 62, 'type', 'Type', 'user_type', 1, '', '', '', 0),
109(375, 1, 63, 'id', 'ID', 'id', 0, '', '', '', 0),
110(376, 2, 63, 'name', 'Name', '', 1, '30%', '', '', 0),
111(377, 3, 63, 'admin', 'Users are Admins?', 'yes_no', 1, '', '', '', 0),
112(378, 4, 63, 'default_value', 'Default group', 'yes_no', 1, '', '', '', 0),
113(379, 5, 63, 'access_level', 'Access Level', 'integer', 1, '', '', '', 0),
114(380, 1, 64, 'id', 'ID', 'id', 0, '', '', '', 0),
115(381, 2, 64, 'key', 'Key', '', 1, '20%', '', '', 0),
116(382, 3, 64, 'value', 'Value', 'textarea_small', 1, '', '', '', 0),
117(383, 4, 64, 'user', 'User', 'user', 1, '30%', '', '', 0),
118(384, 1, 65, 'id', 'ID', 'id', 0, '', '', '', 0),
119(385, 2, 65, 'date_time', 'Date & Time', 'datetime_now', 1, '40%', '', '', 0),
120(386, 3, 65, 'file', 'File', 'file', 1, '', '', '', 0),
121(387, 1, 66, 'id', 'ID', 'id', 0, '', '', '', 0),
122(388, 2, 66, 'subject', 'Subject', '', 1, '20%', '', '', 0),
123(389, 3, 66, 'date_sent', 'Date Sent', 'datetime_now', 1, '25%', '', '', 0),
124(390, 4, 66, 'recipient', 'Recipient', 'user', 1, '20%', '', '', 0),
125(391, 5, 66, 'sender', 'Sender', 'user', 1, '', '', '', 0),
126(392, 6, 66, 'type', 'Type', 'user_message_type', 1, '', '', '', 1),
127(393, 7, 66, 'message', 'Message', 'rich_text_large', 1, '', '', '', 0);
128
129-- --------------------------------------------------------
130
131--
132-- Structura de tabel pentru tabelul `modules_fields_validation`
133--
134
135DROP TABLE IF EXISTS `modules_fields_validation`;
136CREATE TABLE IF NOT EXISTS `modules_fields_validation` (
137 `id` int(16) NOT NULL AUTO_INCREMENT,
138 `name` varchar(255) COLLATE utf8_swedish_ci NOT NULL,
139 `field_id` int(32) NOT NULL,
140 PRIMARY KEY (`id`)
141) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci AUTO_INCREMENT=33 ;
142
143--
144-- Salvarea datelor din tabel `modules_fields_validation`
145--
146
147INSERT INTO `modules_fields_validation` (`id`, `name`, `field_id`) VALUES
148(16, 'instance', 19),
149(17, 'instance', 18),
150(18, 'instance', 20),
151(19, 'unique_current', 18),
152(20, 'unique', 8),
153(21, 'instance', 8),
154(22, 'instance', 14),
155(23, 'unique', 35),
156(24, 'instance', 35),
157(25, 'instance', 9),
158(26, 'boolean_true', 19),
159(27, 'email', 363),
160(28, 'instance', 363),
161(29, 'unique', 363),
162(30, 'instance', 370),
163(31, 'instance', 376),
164(32, 'instance', 388);
165
166-- --------------------------------------------------------
167
168--
169-- Structura de tabel pentru tabelul `modules_fields_validation_arguments`
170--
171
172DROP TABLE IF EXISTS `modules_fields_validation_arguments`;
173CREATE TABLE IF NOT EXISTS `modules_fields_validation_arguments` (
174 `id` int(32) NOT NULL AUTO_INCREMENT,
175 `validation_id` int(32) NOT NULL,
176 `index` int(2) NOT NULL,
177 `value` varchar(32) COLLATE utf8_swedish_ci NOT NULL,
178 PRIMARY KEY (`id`),
179 KEY `id` (`id`)
180) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci AUTO_INCREMENT=21 ;