This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
2_schema.sql
176 lines (153 loc) · 5.89 KB
/
2_schema.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
USE emmet;
--
-- Table structure for table `mobile_user`
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE IF NOT EXISTS `mobile_user` (
`id` bigint(20) NOT NULL auto_increment,
`version` bigint(20) NOT NULL,
`user_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `auth_key`
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE IF NOT EXISTS `auth_key` (
`id` bigint(20) NOT NULL auto_increment,
`version` bigint(20) NOT NULL,
`auth_key` varchar(255) NOT NULL,
`mobile_user_id` bigint(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `FK5563974818294D56` (`mobile_user_id`),
CONSTRAINT `FK5563974818294D56` FOREIGN KEY (`mobile_user_id`) REFERENCES `mobile_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `authorised_system`
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE IF NOT EXISTS `authorised_system` (
`id` bigint(20) NOT NULL auto_increment,
`version` bigint(20) NOT NULL,
`host` varchar(255) NOT NULL,
`description` varchar(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `authorities`
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE IF NOT EXISTS `authorities` (
`userid` int(11) NOT NULL,
`authority` varchar(30) NOT NULL,
PRIMARY KEY (`userid`,`authority`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `c3p0TestTable`
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE IF NOT EXISTS `c3p0TestTable` (
`a` char(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `identities`
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE IF NOT EXISTS `identities` (
`userid` int(11) NOT NULL,
`identityuri` varchar(255) NOT NULL,
`domain` varchar(255) NOT NULL,
PRIMARY KEY (`userid`,`identityuri`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `passwords`
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET sql_mode = '';
CREATE TABLE IF NOT EXISTS `passwords` (
`userid` int(11) NOT NULL,
`password` varchar(255) NOT NULL,
`created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`expiry` timestamp NOT NULL default '0000-00-00 00:00:00',
`status` varchar(10) NOT NULL,
PRIMARY KEY (`userid`,`password`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `profiles`
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE IF NOT EXISTS `profiles` (
`userid` int(11) NOT NULL,
`property` varchar(255) NOT NULL,
`value` varchar(255) NOT NULL,
PRIMARY KEY (`userid`,`property`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `role`
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE IF NOT EXISTS `role` (
`role` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
PRIMARY KEY (`role`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `role`
--
LOCK TABLES `role` WRITE;
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
INSERT INTO `role` VALUES ('ROLE_ABRS_ADMIN',''),('ROLE_ABRS_INSTITUTION',''),('ROLE_ADMIN','Admin role for ALA staff'),('ROLE_API_EDITOR','Enables a user to update the online web service API'),('ROLE_APPD_USER','APPD user'),('ROLE_AVH_ADMIN',''),('ROLE_AVH_CLUB',''),('ROLE_COLLECTION_ADMIN',''),('ROLE_COLLECTION_EDITOR',''),('ROLE_COLLECTORS_ADMIN',''),('ROLE_FC_ADMIN','Admin role for the Field Capture webapp'),('ROLE_FC_OFFICER','Field Capture officer role'),('ROLE_FC_READ_ONLY','Provides read only access to all projects in the field capture system.'),('ROLE_IMAGE_ADMIN',''),('ROLE_SPATIAL_ADMIN',''),('ROLE_SYSTEM_ADMIN',''),('ROLE_USER',''),('ROLE_VP_ADMIN',''),('ROLE_VP_TEST_ADMIN','The admin role for BVP Test server'),('ROLE_VP_VALIDATOR','');
/*!40000 ALTER TABLE `role` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user_role`
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE IF NOT EXISTS `user_role` (
`user_id` bigint(20) NOT NULL,
`role_id` varchar(255) NOT NULL,
PRIMARY KEY (`user_id`,`role_id`),
KEY `FK143BF46AF129182D` (`role_id`),
CONSTRAINT `FK143BF46AF129182D` FOREIGN KEY (`role_id`) REFERENCES `role` (`role`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `users`
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET sql_mode = '';
CREATE TABLE IF NOT EXISTS `users` (
`userid` int(11) NOT NULL auto_increment,
`username` varchar(255) default NULL,
`firstname` varchar(255) default NULL,
`lastname` varchar(255) default NULL,
`email` varchar(255) default NULL,
`activated` char(1) NOT NULL,
`created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`expiry` timestamp NOT NULL default '0000-00-00 00:00:00',
`locked` char(1) NOT NULL,
`temp_auth_key` varchar(255) default NULL,
PRIMARY KEY (`userid`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=10649 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;