WIP: reduce abstraction #6

Closed
coolaj86 wants to merge 7 commits from cleanup into kid-fix
1 changed files with 40 additions and 0 deletions
Showing only changes of commit 191ed410e4 - Show all commits

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);
```