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;