store custom app certificates in subdomains table

the REST route and model code is still ununsed as before since there
is no way to set the certs from the UI.
This commit is contained in:
Girish Ramakrishnan
2021-05-05 10:34:22 -07:00
parent 963e92b517
commit 7f6a0555b2
8 changed files with 64 additions and 49 deletions

View File

@@ -157,7 +157,7 @@ CREATE TABLE IF NOT EXISTS domains(
tlsConfigJson TEXT, /* JSON containing the tls provider config */
wellKnownJson TEXT, /* JSON containing well known docs for this domain */
fallbackCertificateJson TEXT,
fallbackCertificateJson MEDIUMTEXT,
PRIMARY KEY (domain))
@@ -210,6 +210,8 @@ CREATE TABLE IF NOT EXISTS subdomains(
subdomain VARCHAR(128) NOT NULL,
type VARCHAR(128) NOT NULL, /* primary or redirect */
certificateJson MEDIUMTEXT,
FOREIGN KEY(domain) REFERENCES domains(domain),
FOREIGN KEY(appId) REFERENCES apps(id),
UNIQUE (subdomain, domain));