Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

powerdns-sqlite-db-structure.sql 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. create table domains (
  2. id INTEGER PRIMARY KEY,
  3. name VARCHAR(255) NOT NULL COLLATE NOCASE,
  4. master VARCHAR(128) DEFAULT NULL,
  5. last_check INTEGER DEFAULT NULL,
  6. type VARCHAR(6) NOT NULL,
  7. notified_serial INTEGER DEFAULT NULL,
  8. account VARCHAR(40) DEFAULT NULL
  9. );
  10. CREATE UNIQUE INDEX name_index ON domains(name);
  11. CREATE TABLE records (
  12. id INTEGER PRIMARY KEY,
  13. domain_id INTEGER DEFAULT NULL,
  14. name VARCHAR(255) DEFAULT NULL,
  15. type VARCHAR(10) DEFAULT NULL,
  16. content VARCHAR(65535) DEFAULT NULL,
  17. ttl INTEGER DEFAULT NULL,
  18. prio INTEGER DEFAULT NULL,
  19. change_date INTEGER DEFAULT NULL,
  20. disabled BOOLEAN DEFAULT 0
  21. );
  22. CREATE INDEX rec_name_index ON records(name);
  23. CREATE INDEX nametype_index ON records(name,type);
  24. CREATE INDEX domain_id ON records(domain_id);
  25. create table supermasters (
  26. ip VARCHAR(64) NOT NULL,
  27. nameserver VARCHAR(255) NOT NULL COLLATE NOCASE,
  28. account VARCHAR(40) DEFAULT NULL
  29. );
  30. CREATE UNIQUE INDEX ip_nameserver_pk ON supermasters(ip, nameserver);
  31. CREATE TABLE comments (
  32. id INTEGER PRIMARY KEY,
  33. domain_id INTEGER NOT NULL,
  34. name VARCHAR(255) NOT NULL,
  35. type VARCHAR(10) NOT NULL,
  36. modified_at INT NOT NULL,
  37. account VARCHAR(40) DEFAULT NULL,
  38. comment VARCHAR(65535) NOT NULL
  39. );
  40. CREATE INDEX comments_domain_id_index ON comments (domain_id);
  41. CREATE INDEX comments_nametype_index ON comments (name, type);
  42. CREATE INDEX comments_order_idx ON comments (domain_id, modified_at);