-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sql
73 lines (61 loc) · 3.02 KB
/
install.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
-- Skyfallen Secure Forms, SQL INSTALL SCRIPT
-- version SFDBSQLV-301001
-- https://www.theskyafallen.com
--
CREATE TABLE `ssf_fields` (
`form_id` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`field_order` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
`field_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`field_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`field_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`field_description` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`field_charlimit` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`field_options` varchar(4096) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `ssf_forms` (
`formid` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`formname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`formcreator` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`formcreationtime` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`formdomain` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`formtype` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`formvisibility` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `ssf_form_meta` (
`formid` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`form_meta` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`form_meta_value` varchar(1024) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `ssf_key_meta` (
`keyid` varchar(4096) COLLATE utf8_unicode_ci NOT NULL,
`meta` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`value` varchar(8192) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `ssf_responses` (
`ssf_form_id` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`ssf_respondent_id` varchar(2048) COLLATE utf8_unicode_ci NOT NULL,
`ssf_form_field_id` varchar(2048) COLLATE utf8_unicode_ci NOT NULL,
`ssf_field_response` varchar(8192) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `ssf_settings` (
`setting` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`value` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `ssf_users` (
`id` int(11) NOT NULL,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`hashed_password` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
`type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`role` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `ssf_forms`
ADD UNIQUE KEY `formid` (`formid`);
ALTER TABLE `ssf_settings`
ADD UNIQUE KEY `setting` (`setting`);
ALTER TABLE `ssf_users`
ADD UNIQUE KEY `id` (`id`);
ALTER TABLE `ssf_fields`
ADD UNIQUE KEY `field_id` (`field_id`);
ALTER TABLE `ssf_users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;