Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

powerdns-oracle-db-structure.sql 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. create table domains (
  2. id NUMBER,
  3. name VARCHAR(255) NOT NULL,
  4. master VARCHAR(128) DEFAULT NULL,
  5. last_check INT DEFAULT NULL,
  6. type VARCHAR(6) NOT NULL,
  7. notified_serial INT DEFAULT NULL,
  8. account VARCHAR(40) DEFAULT NULL,
  9. primary key (id)
  10. );
  11. create sequence DOMAINS_ID_SEQUENCE;
  12. create index DOMAINS$NAME on domains (NAME);
  13. CREATE TABLE records (
  14. id number(11) not NULL,
  15. domain_id INT DEFAULT NULL REFERENCES Domains(ID) ON DELETE CASCADE,
  16. name VARCHAR(255) DEFAULT NULL,
  17. type VARCHAR(10) DEFAULT NULL,
  18. content VARCHAR2(4000) DEFAULT NULL,
  19. ttl INT DEFAULT NULL,
  20. prio INT DEFAULT NULL,
  21. change_date INT DEFAULT NULL,
  22. disabled INT DEFAULT 0,
  23. ordername VARCHAR(255) DEFAULT NULL,
  24. auth INT DEFAULT NULL,
  25. primary key (id)
  26. ) pctfree 40;
  27. create index records$nametype on records (name, type);
  28. create index records$domain_id on records (domain_id);
  29. create index records$recordorder on records (domain_id, ordername);
  30. create sequence records_id_sequence;
  31. create table supermasters (
  32. ip VARCHAR(64) NOT NULL,
  33. nameserver VARCHAR(255) NOT NULL,
  34. account VARCHAR(40) DEFAULT NULL,
  35. PRIMARY KEY(ip, nameserver)
  36. );
  37. CREATE TABLE comments (
  38. id number(11) not NULL,
  39. domain_id INT NOT NULL REFERENCES Domains(ID) ON DELETE CASCADE,
  40. name VARCHAR(255) NOT NULL,
  41. type VARCHAR(10) NOT NULL,
  42. modified_at INT NOT NULL,
  43. account VARCHAR(40) NOT NULL,
  44. comment VARCHAR2(4000) NOT NULL
  45. );
  46. CREATE INDEX comments$nametype ON comments (name, type);
  47. CREATE INDEX comments$domain_id ON comments (domain_id);
  48. CREATE INDEX comments$order ON comments (domain_id, modified_at);
  49. CREATE SEQUENCE comments_id_sequence;
  50. create table domainmetadata (
  51. id NUMBER,
  52. domain_id INT NOT NULL,
  53. kind VARCHAR(16),
  54. content VARCHAR2(4000),
  55. primary key(id)
  56. );
  57. create sequence DOMAINMETADATA_ID_SEQUENCE;
  58. create index domainmetadata$domainid on domainmetadata(domain_id);
  59. create table cryptokeys (
  60. id NUMBER,
  61. domain_id INT NOT NULL,
  62. flags INT NOT NULL,
  63. active INT NOT NULL,
  64. content VARCHAR2(4000),
  65. primary key(id)
  66. );
  67. create sequence CRYPTOKEYS_ID_SEQUENCE;
  68. create index cryptokeys$domainid on cryptokeys(domain_id);
  69. create table tsigkeys (
  70. id NUMBER,
  71. name VARCHAR(255),
  72. algorithm VARCHAR(50),
  73. secret VARCHAR(255),
  74. primary key(id)
  75. );
  76. create sequence TSIGKEYS_ID_SEQUENCE;
  77. create unique index tsigkeys$namealgo on tsigkeys(name, algorithm);