`memid` int(11) NOT NULL,
`domain` varchar(255) NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `deleted` datetime DEFAULT NULL,
+ `modified` datetime NULL DEFAULT NULL,
+ `deleted` datetime NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `memid` (`memid`),
KEY `domain` (`domain`),
`id` int(11) NOT NULL AUTO_INCREMENT,
`memid` int(11) NOT NULL DEFAULT '0',
`email` varchar(255) NOT NULL DEFAULT '',
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `deleted` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `modified` datetime NULL DEFAULT NULL,
+ `deleted` datetime NULL DEFAULT NULL,
`hash` varchar(50) NOT NULL DEFAULT '',
`attempts` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
`id` int(11) NOT NULL AUTO_INCREMENT,
`memid` int(11) NOT NULL DEFAULT '0',
`serial` varchar(50) NOT NULL DEFAULT '',
- `CN` varchar(255) NOT NULL DEFAULT '',
- `subject` varchar(1024) NOT NULL,
`keytype` char(2) NOT NULL DEFAULT 'NS',
`codesign` tinyint(1) NOT NULL DEFAULT '0',
`md` enum('md5','sha1','sha256','sha512') NOT NULL DEFAULT 'sha512',
`csr_name` varchar(255) NOT NULL DEFAULT '',
`csr_type` enum('CSR', 'SPKAC') NOT NULL,
`crt_name` varchar(255) NOT NULL DEFAULT '',
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `revoked` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `created` timestamp NULL DEFAULT NULL,
+ `modified` datetime NULL DEFAULT NULL,
+ `revoked` datetime NULL DEFAULT NULL,
+ `expire` datetime NULL DEFAULT NULL,
`renewed` tinyint(1) NOT NULL DEFAULT '0',
`disablelogin` int(1) NOT NULL DEFAULT '0',
`pkhash` char(40) DEFAULT NULL,
KEY `emailcrt` (`crt_name`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
+
+DROP TABLE IF EXISTS `certAvas`;
+CREATE TABLE `certAvas` (
+ `certid` int(11) NOT NULL,
+ `name` varchar(20) NOT NULL,
+ `value` varchar(255) NOT NULL,
+
+ PRIMARY KEY (`certid`, `name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
DROP TABLE IF EXISTS `clientcerts`;
CREATE TABLE `clientcerts` (
`id` int(11) NOT NULL,
`location` varchar(255) NOT NULL DEFAULT '',
`date` varchar(255) NOT NULL DEFAULT '',
# date when assurance was entered
- `when` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `when` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
#?
- `expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `expire` datetime NULL DEFAULT NULL,
#?????????????????
`sponsor` int(11) NOT NULL DEFAULT '0',
# date when assurance was deleted (or 0)
- `deleted` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `deleted` datetime NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `from` (`from`),
KEY `to` (`to`),
CREATE TABLE IF NOT EXISTS `user_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
- `permission` enum('supporter','arbitrator','blockedassuree','blockedassurer','blockedlogin','ttp-assurer','ttp-applicant', 'codesigning') NOT NULL,
+ `permission` enum('supporter','arbitrator','blockedassuree','blockedassurer','blockedlogin','ttp-assurer','ttp-applicant', 'codesigning', 'orgassurer') NOT NULL,
`granted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`deleted` timestamp NULL DEFAULT NULL,
`grantedby` int(11) NOT NULL,
CREATE TABLE IF NOT EXISTS `org_admin` (
`orgid` int(11) NOT NULL,
`memid` int(11) NOT NULL,
+ `master` enum('y', 'n') NOT NULL,
`creator` int(11) NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `deleter` int(11) NULL DEFAULT NULL,
`deleted` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`orgid`, `memid`)
+ KEY (`orgid`, `memid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;