document table

This commit is contained in:
AJ ONeal 2019-05-09 00:48:57 -06:00
parent b0c8905bf6
commit 191ed410e4
1 changed files with 40 additions and 0 deletions

View File

@ -141,3 +141,43 @@ Greenlock.create({
...
});
```
## Table Structure
This is the table structure that's created.
```sql
CREATE TABLE `Keypairs` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`xid` VARCHAR(255) UNIQUE,
`content` TEXT,
`createdAt` DATETIME NOT NULL,
`updatedAt` DATETIME NOT NULL);
CREATE TABLE `Domains` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`subject` VARCHAR(255) UNIQUE,
`altnames` TEXT,
`createdAt` DATETIME NOT NULL,
`updatedAt` DATETIME NOT NULL);
CREATE TABLE `Certificates` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`subject` VARCHAR(255) UNIQUE,
`cert` TEXT,
`issuedAt` DATETIME,
`expiresAt` DATETIME,
`altnames` TEXT,
`chain` TEXT,
`createdAt` DATETIME NOT NULL,
`updatedAt` DATETIME NOT NULL);
CREATE TABLE `Chains` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`xid` VARCHAR(255) UNIQUE,
`content` TEXT,
`createdAt` DATETIME NOT NULL,
`updatedAt` DATETIME NOT NULL,
`CertificateId` INTEGER REFERENCES
`Certificates` (`id`) ON DELETE SET NULL ON UPDATE CASCADE);
```