-- schema created by cra and used by sts
CREATE SCHEMA cra;

--USE cra;

DROP TABLE IF EXISTS cra.crl;
CREATE TABLE cra.crl (
	id BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY,
	url VARCHAR(2000) NOT NULL,
	lastmodified BIGINT NOT NULL,
	nextupdate BIGINT NOT NULL
)
GRANT ALL ON cra.crl TO sts;


DROP TABLE IF EXISTS cra.revoked;
CREATE TABLE cra.revoked (
  id BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY,
  crlid BIGINT NOT NULL,
  serialnumber VARCHAR(48),
  added BIGINT NOT NULL,
  since BIGINT NOT NULL,
  FOREIGN KEY (crlid) REFERENCES cra.crl(id)
)
GRANT ALL ON cra.revoked TO sts;

