forked from bgaultier/laboite-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaboite-webapp.sql
103 lines (86 loc) · 3.49 KB
/
laboite-webapp.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
-- laboite-webapp SQL Dump
-- version 0.1
--
-- --------------------------------------------------------
--
-- Structure de la table `apps`
--
CREATE TABLE IF NOT EXISTS apps (
id int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(32) NOT NULL,
description varchar(255) DEFAULT NULL,
city_needed tinyint(1) NOT NULL DEFAULT '0',
login_needed tinyint(1) NOT NULL DEFAULT '0',
password_needed tinyint(1) NOT NULL DEFAULT '0',
apikey_needed tinyint(1) NOT NULL DEFAULT '0',
feedid_needed tinyint(1) NOT NULL DEFAULT '0',
stop_needed tinyint(1) NOT NULL DEFAULT '0',
route_needed tinyint(1) NOT NULL DEFAULT '0',
direction_needed tinyint(1) NOT NULL DEFAULT '0',
station_needed tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
--
-- Contenu de la table `apps`
--
INSERT INTO apps VALUES (1, 'Time', 'Shows the clock time', 1, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO apps VALUES (2, 'Weather', 'Displays the weather forecast based on data received from wunderground.com', 1, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO apps VALUES (3, 'Buses', 'Displays the number of minutes you have to wait for the next bus at your stop (data.keolis-rennes.com)', 0, 0, 0, 0, 0, 1, 1, 1, 0);
INSERT INTO apps VALUES (4, 'Bikes', 'Displays the number of bikes available at your bike station (data.keolis-rennes.com)', 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO apps VALUES (5, 'Energy', 'Displays the energy consumption history chart of an emoncms.org feed', 0, 0, 0, 1, 0, 0, 0, 0, 0);
INSERT INTO apps VALUES (6, 'Waves', 'Displays the predicted quality and conditions of a surf spot', 1, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO apps VALUES (7, 'Messages', 'Displays messages sent by your friends', 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO apps VALUES (8, 'Coffees', 'Displays your daily coffee consumption', 0, 0, 0, 1, 0, 0, 0, 0, 0);
-- --------------------------------------------------------
--
-- Structure de la table `device_apps`
--
CREATE TABLE IF NOT EXISTS device_apps (
deviceid int(11) NOT NULL,
appid int(11) NOT NULL,
checked tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (deviceid,appid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `devices`
--
CREATE TABLE IF NOT EXISTS devices (
id int(11) NOT NULL AUTO_INCREMENT,
creator int(11) NOT NULL,
`name` varchar(32) NOT NULL,
location varchar(128) NOT NULL,
apikey varchar(8) NOT NULL,
lastactivity timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `user_apps`
--
CREATE TABLE IF NOT EXISTS user_apps (
userid int(11) NOT NULL,
appid int(11) NOT NULL,
`status` tinyint(1) DEFAULT NULL,
city varchar(64) DEFAULT NULL,
login varchar(64) DEFAULT NULL,
`password` varchar(64) DEFAULT NULL,
apikey varchar(64) DEFAULT NULL,
feedid int(11) DEFAULT NULL,
`stop` char(4) DEFAULT NULL,
route char(4) DEFAULT NULL,
direction tinyint(1) DEFAULT NULL,
station char(4) DEFAULT NULL,
PRIMARY KEY (userid,appid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `users`
--
CREATE TABLE IF NOT EXISTS users (
id int(11) NOT NULL AUTO_INCREMENT,
email varchar(64) NOT NULL,
`password` varchar(64) NOT NULL,
locale char(5) DEFAULT 'en_US',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;