Commit 0e1882ec authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Move record_type declaration to domaindb.sql.

Also updates the test_data.sql file to select id's from that table
instead of assuming id's.
parent cd6b3427
......@@ -68,3 +68,9 @@ CREATE TABLE update_key
)ENGINE=InnoDB;//
INSERT INTO record_types (id, name)
VALUES ("A"),
("AAAA"),
("CNAME"),
("TXT");
......@@ -7,14 +7,11 @@ VALUES (1, 2278, "hornquist.se"),
(2, 2278, "hugoweb.ga"),
(3, 2116, "jiffe.jiff");
INSERT INTO record_types (id, name)
VALUES (1, "A"),
(2, "AAAA"),
(3, "CNAME"),
(4, "TXT");
INSERT INTO subdomain (id, domainid, name, rr, ttl)
VALUES (1, 1, "@", 1, 300),
(2, 2, "www", 1, 300),
(3, 1, "blog", 1, 300),
(4, 3, "jeff", 2, 86400);
SELECT (1, 1, "@", id, 300) FROM record_types WHERE name = "A";
INSERT INTO subdomain (id, domainid, name, rr, ttl)
SELECT (2, 2, "www", id, 300) FROM record_types WHERE name = "A";
INSERT INTO subdomain (id, domainid, name, rr, ttl)
SELECT (3, 1, "blog", id, 300) FROM record_types WHERE name = "A";
INSERT INTO subdomain (id, domainid, name, rr, ttl)
SELECT (4, 3, "jeff", id, 86400) FROM record_types WHERE name = "AAAA";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment