-
Notifications
You must be signed in to change notification settings - Fork 1
/
db.sql
28 lines (23 loc) · 868 Bytes
/
db.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
CREATE DATABASE update_watch CHARACTER SET utf8 COLLATE utf8_swedish_ci;
USE update_watch;
CREATE TABLE `users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`email` TEXT NOT NULL,
`password` TEXT NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB CHARSET utf8;
CREATE TABLE `watchers` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`owner` int(10) NOT NULL, /* username, since email can be changed */
`backend` TEXT NOT NULL,
`subject` TEXT NOT NULL, /* FIXME: return `null` in data.php if it's 'default'. or something like that */
`url` TEXT NULL,
`latest_version_number` INT NOT NULL,
`latest_version_text` TEXT NOT NULL,
`latest_version_url` TEXT NULL,
`running_version_number` INT NOT NULL,
`running_version_text` TEXT NOT NULL,
`running_version_url` TEXT NULL,
`last_updated` int(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB CHARSET utf8;