|
@@ -0,0 +1,122 @@
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+CREATE TABLE diffs (id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
+ zone_id INTEGER NOT NULL,
|
|
|
+ version INTEGER NOT NULL,
|
|
|
+ operation INTEGER NOT NULL,
|
|
|
+ name STRING NOT NULL COLLATE NOCASE,
|
|
|
+ rrtype STRING NOT NULL COLLATE NOCASE,
|
|
|
+ ttl INTEGER NOT NULL,
|
|
|
+ rdata STRING NOT NULL);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 4294967280, 0, "example.org.", "SOA", 3600,
|
|
|
+ "ns1.example.org. admin.example.org. 4294967280 3600 1800 2419200, 7200");
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 4294967280, 0, "www.example.org.", "A", 3600, "192.0.2.31");
|
|
|
+
|
|
|
+
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1230, 1, "example.org.", "SOA", 3600,
|
|
|
+ "ns1.example.org. admin.example.org. 1230 3600 1800 2419200, 7200");
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1230, 1, "www.example.org.", "A", 3600, "192.0.2.21");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1230, 0, "example.org.", "SOA", 1800,
|
|
|
+ "ns1.example.org. admin.example.org. 1230 3600 1800 2419200, 7200");
|
|
|
+
|
|
|
+
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1231, 1, "example.org.", "SOA", 3600,
|
|
|
+ "ns1.example.org. admin.example.org. 1231 3600 1800 2419200, 7200");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1231, 0, "example.org.", "SOA", 3600,
|
|
|
+ "ns1.example.org. admin.example.org. 1231 3600 1800 2419200, 7200");
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1231, 0, "unused.example.org.", "A", 3600, "192.0.2.102");
|
|
|
+
|
|
|
+
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1232, 1, "example.org.", "SOA", 3600,
|
|
|
+ "ns1.example.org. admin.example.org. 1232 3600 1800 2419200, 7200");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1232, 0, "example.org.", "SOA", 3600,
|
|
|
+ "ns1.example.org. admin.example.org. 1232 3600 1800 2419200, 7200");
|
|
|
+
|
|
|
+
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1233, 1, "example.org.", "SOA", 3600,
|
|
|
+ "ns1.example.org. admin.example.org. 1233 3600 1800 2419200, 7200");
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1233, 1, "sub.example.org.", "NS", 3600, "ns.sub.example.org.");
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1233, 1, "ns.sub.example.org.", "A", 3600, "192.0.2.101");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1233, 0, "example.org.", "SOA", 3600,
|
|
|
+ "ns1.example.org. admin.example.org. 1233 3600 1800 2419200, 7200");
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1233, 0, "www.example.org.", "A", 3600, "192.0.2.21");
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1233, 0, "mail.example.org.", "A", 3600, "192.0.2.210");
|
|
|
+
|
|
|
+
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1234, 1, "example.org.", "SOA", 3600,
|
|
|
+ "ns1.example.org. admin.example.org. 1234 3600 1800 2419200, 7200");
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1234, 1, "www.example.org.", "A", 3600, "192.0.2.1");
|
|
|
+INSERT INTO diffs(zone_id, version, operation, name, rrtype, ttl, rdata)
|
|
|
+ VALUES(1, 1234, 1, "mail.example.org.", "A", 3600, "192.0.2.10");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+UPDATE diffs SET zone_id =
|
|
|
+ (SELECT id FROM ZONES LIMIT 1);
|