2 CREATE TABLE prefix_data (
4 course integer NOT NULL default '0',
5 name varchar(255) NOT NULL default '',
6 intro text NOT NULL default '',
7 comments integer NOT NULL default '0',
8 timeavailablefrom integer NOT NULL default '0',
9 timeavailableto integer NOT NULL default '0',
10 timeviewfrom integer NOT NULL default '0',
11 timeviewto integer NOT NULL default '0',
12 requiredentries integer NOT NULL default '0',
13 requiredentriestoview integer NOT NULL default '0',
14 maxentries integer NOT NULL default '0',
15 rssarticles integer NOT NULL default '0',
18 listtemplateheader text,
19 listtemplatefooter text,
22 rsstitletemplate text,
25 approval integer NOT NULL default '0',
26 scale integer NOT NULL default '0',
27 assessed integer NOT NULL default '0',
28 defaultsort integer NOT NULL default '0',
29 defaultsortdir integer NOT NULL default '0',
30 editany integer NOT NULL default '0'
35 CREATE TABLE prefix_data_content (
36 id SERIAL PRIMARY KEY,
37 fieldid integer NOT NULL default '0',
38 recordid integer NOT NULL default '0',
47 CREATE TABLE prefix_data_fields (
48 id SERIAL PRIMARY KEY,
49 dataid integer NOT NULL default '0',
50 type varchar(255) NOT NULL default '',
51 name varchar(255) NOT NULL default '',
52 description text NOT NULL default '',
65 CREATE TABLE prefix_data_records (
66 id SERIAL PRIMARY KEY,
67 userid integer NOT NULL default '0',
68 groupid integer NOT NULL default '0',
69 dataid integer NOT NULL default '0',
70 timecreated integer NOT NULL default '0',
71 timemodified integer NOT NULL default '0',
72 approved integer NOT NULL default '0'
76 CREATE TABLE prefix_data_comments (
77 id SERIAL PRIMARY KEY,
78 userid integer NOT NULL default '0',
79 recordid integer NOT NULL default '0',
80 content text NOT NULL default '',
81 created integer NOT NULL default '0',
82 modified integer NOT NULL default '0'
86 CREATE TABLE prefix_data_ratings (
87 id SERIAL PRIMARY KEY,
88 userid integer NOT NULL default '0',
89 recordid integer NOT NULL default '0',
90 rating integer NOT NULL default '0'
93 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'view', 'data', 'name');
94 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'add', 'data', 'name');
95 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'update', 'data', 'name');
96 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'record delete', 'data', 'name');
97 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'fields add', 'data_fields', 'name');
98 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'fields update', 'data_fields', 'name');
99 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'templates saved', 'data', 'name');
100 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'templates def', 'data', 'name');