Move revokedCertificates and replacementOrders into db (#7639)
These database schema changes were applied in prod in IN-9706 and IN-10081.
This commit is contained in:
parent
7b6935d223
commit
a61aadc9e4
|
|
@ -1,21 +0,0 @@
|
|||
-- +migrate Up
|
||||
-- SQL in section 'Up' is executed when this migration is applied
|
||||
|
||||
CREATE TABLE `revokedCertificates` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`issuerID` bigint(20) NOT NULL,
|
||||
`serial` varchar(255) NOT NULL,
|
||||
`notAfterHour` datetime NOT NULL,
|
||||
`shardIdx` bigint(20) NOT NULL,
|
||||
`revokedDate` datetime NOT NULL,
|
||||
`revokedReason` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `issuerID_shardIdx_notAfterHour_idx` (`issuerID`, `shardIdx`, `notAfterHour`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
|
||||
PARTITION BY RANGE(id)
|
||||
(PARTITION p_start VALUES LESS THAN (MAXVALUE));
|
||||
|
||||
-- +migrate Down
|
||||
-- SQL section 'Down' is executed when this migration is rolled back
|
||||
|
||||
DROP TABLE `revokedCertificates`;
|
||||
|
|
@ -0,0 +1 @@
|
|||
../../db/boulder_sa/20230919000000_RevokedCertificates.sql
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
-- +migrate Up
|
||||
-- SQL in section 'Up' is executed when this migration is applied
|
||||
|
||||
CREATE TABLE `replacementOrders` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`serial` varchar(255) NOT NULL,
|
||||
`orderID` bigint(20) NOT NULL,
|
||||
`orderExpires` datetime NOT NULL,
|
||||
`replaced` boolean DEFAULT false,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `serial_idx` (`serial`),
|
||||
KEY `orderID_idx` (`orderID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
|
||||
PARTITION BY RANGE(id)
|
||||
(PARTITION p_start VALUES LESS THAN (MAXVALUE));
|
||||
|
||||
-- +migrate Down
|
||||
-- SQL section 'Down' is executed when this migration is rolled back
|
||||
|
||||
DROP TABLE `replacementOrders`;
|
||||
|
|
@ -0,0 +1 @@
|
|||
../../db/boulder_sa/20240119000000_ReplacementOrders.sql
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
-- +migrate Up
|
||||
-- SQL in section 'Up' is executed when this migration is applied
|
||||
|
||||
CREATE TABLE `revokedCertificates` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`issuerID` bigint(20) NOT NULL,
|
||||
`serial` varchar(255) NOT NULL,
|
||||
`notAfterHour` datetime NOT NULL,
|
||||
`shardIdx` bigint(20) NOT NULL,
|
||||
`revokedDate` datetime NOT NULL,
|
||||
`revokedReason` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `issuerID_shardIdx_notAfterHour_idx` (`issuerID`, `shardIdx`, `notAfterHour`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
|
||||
PARTITION BY RANGE(id)
|
||||
(PARTITION p_start VALUES LESS THAN (MAXVALUE));
|
||||
|
||||
-- +migrate Down
|
||||
-- SQL section 'Down' is executed when this migration is rolled back
|
||||
|
||||
DROP TABLE `revokedCertificates`;
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
-- +migrate Up
|
||||
-- SQL in section 'Up' is executed when this migration is applied
|
||||
|
||||
CREATE TABLE `replacementOrders` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`serial` varchar(255) NOT NULL,
|
||||
`orderID` bigint(20) NOT NULL,
|
||||
`orderExpires` datetime NOT NULL,
|
||||
`replaced` boolean DEFAULT false,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `serial_idx` (`serial`),
|
||||
KEY `orderID_idx` (`orderID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
|
||||
PARTITION BY RANGE(id)
|
||||
(PARTITION p_start VALUES LESS THAN (MAXVALUE));
|
||||
|
||||
-- +migrate Down
|
||||
-- SQL section 'Down' is executed when this migration is rolled back
|
||||
|
||||
DROP TABLE `replacementOrders`;
|
||||
Loading…
Reference in New Issue