forked from borisaguilar/Twitter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.xml
More file actions
55 lines (51 loc) · 1.78 KB
/
database.xml
File metadata and controls
55 lines (51 loc) · 1.78 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<sql>
<name>Ionize Twitter Module Database Creation</name>
<version>0.1</version>
<license>Open Source MIT license</license>
<!--
Module's tables
Prefixed by module_<module name> to avoid collision
-->
<tables>
<!--
User table
One User has an access_token, his secret, consumer_key and consumer_secret;
also has updated some time ago and has a list of tweets
-->
<query>
CREATE TABLE IF NOT EXISTS module_twitter_user (
id_user INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
username VARCHAR(255) NOT NULL,
accesstoken VARCHAR(255) NOT NULL,
accesstokensecret VARCHAR(255) NOT NULL,
consumerkey VARCHAR(255) NOT NULL,
consumersecret VARCHAR(255) NOT NULL,
lastupdate INT(10) NULL,
max_time_difference INT(5) NOT NULL,
PRIMARY KEY (id_user)
)
ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;
</query>
<!--
Tweets Table
Tweets table has tweets associated to a user
-->
<query>
CREATE TABLE IF NOT EXISTS module_twitter_tweets (
id_user INT UNSIGNED NOT NULL,
id_tweet VARCHAR(255) NOT NULL,
screen_name VARCHAR(255) NOT NULL,
userurl VARCHAR(255) NULL,
text VARCHAR(260),
PRIMARY KEY (id_user,id_tweet)
)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;
</query>
</tables>
</sql>