root/form/mysql.sql

Revision 288, 1.9 kB (checked in by kevin, 8 months ago)

Corrected a bug in managing personal and community profile fields that have the same name. Also added the ability to receive form submit notifications.

Line 
1 CREATE TABLE prefix_forms (
2         ident int(11) NOT NULL auto_increment,
3         name varchar(128) NOT NULL,
4         title text,
5         description text,
6     response_text text,
7     created int(11) NOT NULL,
8     owner int(11) NOT NULL,
9     access varchar(20) NOT NULL,
10     notification int(1) NOT NULL,
11     PRIMARY KEY  (ident),
12     KEY owner (owner),
13     KEY access (access),
14     UNIQUE KEY name (name)
15 );
16
17 CREATE TABLE prefix_form_fields (
18     ident int(11) NOT NULL auto_increment,
19     internal_name varchar(128) NOT NULL,
20     original_internal_name varchar(128) NOT NULL,
21     field_type varchar(128) NOT NULL,
22     title text,
23     description text,
24     default_value text,
25     category varchar(128),
26     required int(1),
27     profile int(1),
28     invisible int(1),
29     col int(1),
30     is_keyword_tag int(1),
31     default_access varchar(20),
32     choice_type varchar(20),
33     orientation varchar(20),
34     PRIMARY KEY  (ident),
35     UNIQUE KEY internal_name (internal_name)
36 );
37
38 CREATE TABLE prefix_form_fields_choice (
39     ident int(11) NOT NULL auto_increment,
40     field_id int(11) NOT NULL,
41     group_id int(11) NOT NULL,
42     value varchar(128) NOT NULL,
43     label text,
44     PRIMARY KEY  (ident)
45 );
46
47 CREATE TABLE prefix_form_fields_map (
48     ident int(11) NOT NULL auto_increment,
49     form_id int(11) NOT NULL,
50     field_id int(11) NOT NULL,
51     display_order int(11) NOT NULL,
52     PRIMARY KEY  (ident),
53     KEY form_id (form_id)
54 );
55
56 CREATE TABLE prefix_form_data (
57     ident int(11) NOT NULL auto_increment,
58     name varchar(128) NOT NULL,
59     value text NOT NULL,
60     form_id int(11) NOT NULL,
61     field_id int(11) NOT NULL,
62     map_id int(11) NOT NULL,
63     profile_id int(11) NOT NULL,
64     created int(11) NOT NULL,
65     owner int(11) NOT NULL, 
66     PRIMARY KEY  (ident),
67     KEY name (name),
68     KEY form_id (form_id),
69     KEY field_id (field_id),
70     KEY map_id (map_id),
71     KEY owner (owner)
72 );
Note: See TracBrowser for help on using the browser.