-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinstall.sql
More file actions
22 lines (21 loc) · 783 Bytes
/
install.sql
File metadata and controls
22 lines (21 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
DROP TABLE IF EXISTS `{#}api_keys`;
CREATE TABLE `{#}api_keys` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`is_pub` tinyint(1) unsigned DEFAULT NULL,
`api_key` varchar(32) DEFAULT NULL,
`description` varchar(100) DEFAULT NULL,
`ip_access` text,
`key_methods` text,
PRIMARY KEY (`id`),
UNIQUE KEY `api_key` (`api_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `{#}api_logs`;
CREATE TABLE `{#}api_logs` (
`key_id` int(10) unsigned DEFAULT NULL,
`method` varchar(100) DEFAULT NULL,
`error` tinyint(1) unsigned DEFAULT NULL,
`date_pub` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`request_time` float unsigned DEFAULT NULL,
KEY `key_id` (`key_id`),
KEY `method` (`error`,`method`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;