Describing the reservation table, and renameing file
This commit is contained in:
@@ -258,3 +258,49 @@ sequenceDiagram
|
||||
|
||||

|
||||
|
||||
# Storing the reservation in the Database
|
||||
|
||||
The HPR Database is used to track the `status` of each show as it is been processed, using a normally hidden table `reservations`. It is not publicly available as it contains the IP address of the host uploading the show as a security measure. Once the show is processed the IP address is removed from the table.
|
||||
|
||||
```
|
||||
--
|
||||
-- Table structure for table `reservations`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `reservations`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `reservations` (
|
||||
`ip` varchar(45) NOT NULL,
|
||||
`timestamp` datetime NOT NULL,
|
||||
`key` varchar(46) NOT NULL,
|
||||
`ep_num` int(5) NOT NULL,
|
||||
`ep_date` date NOT NULL,
|
||||
`email` text NOT NULL,
|
||||
`verified` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`status` text DEFAULT NULL,
|
||||
PRIMARY KEY (`key`),
|
||||
UNIQUE KEY `key` (`key`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='To keep track of reservations';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
```
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Description</th>
|
||||
<th>Example</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><th>ip</th><td>IP address of the host uploading the show as a security measure.</td><td>8.8.8.8</td></tr>
|
||||
<tr><th>timestamp</th><td>The time the reservation was first made.</td><td>2044-02-24 12:34:56.789</td></tr>
|
||||
<tr><th>key</th><td>The random unique key for this request</td><td>aeb0579fcac318005d7550a60fd60403676c24d94148b</td></tr>
|
||||
<tr><th>ep_num</th><td>This is the Episode Number that will uniquely identify the show.</td><td>9278</td></tr>
|
||||
<tr><th>ep_date</th><td>The date the show air, namely when it gets put in the main feed.</td><td>2044-02-24</td></tr>
|
||||
<tr><th>email</th>The hosts email address with the `@` replaced with `.nospam@nospam.` as an antispam measure<td></td><td>Emperor.Ming.nospam@nospam.example.com</td></tr>
|
||||
<tr><th>verified</th><td></td><td></td></tr>
|
||||
<tr><th>status</th><td></td><td></td></tr>
|
||||
<tbody>
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user