-- Migrate existing database for key import stuff alter table keypairs add column fixedDate tinyint default 0; -- Rebuild the KEYDATA view drop view if exists KEYDATA_VIEW; create view KEYDATA_VIEW as select k.id as id, k.state as state, k.generate as generate, k.publish as publish, k.ready as ready, k.active as active, k.retire as retire, k.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 from keypairs k left outer join dnsseckeys d on k.id = d.keypair_id;