File: migrate_1_4_8.mysql

package info (click to toggle)
opendnssec 1%3A2.1.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,984 kB
  • sloc: ansic: 73,710; sh: 4,764; sql: 1,296; makefile: 590; perl: 305; xml: 88
file content (21 lines) | stat: -rw-r--r-- 928 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Migrate existing database to 1.4.8

alter table dnsseckeys add column rfc5011 tinyint default 0;
alter table dnsseckeys add column revoked tinyint default 0;

drop view if exists KEYDATA_VIEW;
create view KEYDATA_VIEW as
select k.id as id, d.state as state, k.generate as generate, d.publish as publish,
    d.ready as ready, d.active as active, d.retire as retire, d.dead as dead,
    d.keytype as keytype, k.algorithm as algorithm, k.HSMkey_id as location,
    d.zone_id as zone_id, k.policy_id as policy_id,
    k.securitymodule_id as securitymodule_id, k.size as size,
    k.compromisedflag as compromisedflag,
    k.fixedDate as fixedDate,
    d.rfc5011 as rfc5011, d.revoked as revoked
from  keypairs k left outer join dnsseckeys d
on k.id = d.keypair_id;

insert into parameters (name, description, category_id) select "revoked", "key is revoked?", id from categories where name="ksk";

update dbadmin set version = 4;