From: Frank Brehm Date: Wed, 2 Aug 2017 12:54:19 +0000 (+0200) Subject: Nacharbeiten X-Git-Tag: 0.1.2~151 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=40e66830d40ddd38f32c750d5341e9bec0b3c1d8;p=pixelpark%2Fadmin-tools.git Nacharbeiten --- diff --git a/db/create-pdns-db-postgresql.sql b/db/create-pdns-db-postgresql.sql index 9aa626a..1aa40b6 100644 --- a/db/create-pdns-db-postgresql.sql +++ b/db/create-pdns-db-postgresql.sql @@ -169,3 +169,25 @@ ALTER SEQUENCE IF EXISTS tsigkeys_id_seq OWNER TO pdns; COMMIT; + +-- Enabling automatic SOA serial update after importing all data + +BEGIN; + +INSERT INTO domainmetadata (domain_id, kind, content) + SELECT id, 'SOA-EDIT', 'INCEPTION-INCREMENT' + FROM domains + WHERE id NOT IN ( + SELECT domain_id + FROM domainmetadata + WHERE kind = 'SOA-EDIT'); + +INSERT INTO domainmetadata (domain_id, kind, content) + SELECT id, 'SOA-EDIT-API', 'INCEPTION-INCREMENT' + FROM domains + WHERE id NOT IN ( + SELECT domain_id + FROM domainmetadata + WHERE kind = 'SOA-EDIT-API'); + +COMMIT;