primary key(id)
) Engine=InnoDB;
-create index domainmetaidindex on domainmetadata(domain_id);
+create index domainmetaidindex on domainmetadata(domain_id);
create table cryptokeys (
primary key(id)
) Engine=InnoDB;
-create index domainidindex on cryptokeys(domain_id);
+create index domainidindex on cryptokeys(domain_id);
alter table records add ordername VARCHAR(255) BINARY;
alter table records add auth bool;
create table tsigkeys (
id INT auto_increment,
- name VARCHAR(255),
+ name VARCHAR(255),
algorithm VARCHAR(50),
secret VARCHAR(255),
primary key(id)
master VARCHAR(128) DEFAULT NULL,
last_check INT DEFAULT NULL,
type VARCHAR(6) NOT NULL,
- notified_serial INT DEFAULT NULL,
+ notified_serial INT DEFAULT NULL,
account VARCHAR(40) DEFAULT NULL,
primary key (id)
) Engine=InnoDB;
CREATE INDEX domain_id ON records(domain_id);
create table supermasters (
- ip VARCHAR(64) NOT NULL,
- nameserver VARCHAR(255) NOT NULL,
+ ip VARCHAR(64) NOT NULL,
+ nameserver VARCHAR(255) NOT NULL,
account VARCHAR(40) DEFAULT NULL,
PRIMARY KEY (ip, nameserver)
) Engine=InnoDB;
create index domainidindex on cryptokeys(domain_id);
--- GRANT ALL ON domainmetadata TO pdns;
--- GRANT ALL ON domainmetadata_id_seq TO pdns;
--- GRANT ALL ON cryptokeys TO pdns;
--- GRANT ALL ON cryptokeys_id_seq TO pdns;
-
create table tsigkeys (
id SERIAL PRIMARY KEY,
name VARCHAR(255),
create unique index namealgoindex on tsigkeys(name, algorithm);
--- GRANT ALL ON tsigkeys TO pdns;
--- GRANT ALL ON tsigkeys_id_seq TO pdns;
alter table records alter column type type VARCHAR(10);
account VARCHAR(40) DEFAULT NULL,
PRIMARY KEY (ip, nameserver)
);
-
--- GRANT SELECT ON supermasters TO pdns;
--- GRANT ALL ON domains TO pdns;
--- GRANT ALL ON domains_id_seq TO pdns;
--- GRANT ALL ON records TO pdns;
--- GRANT ALL ON records_id_seq TO pdns;
flags INT NOT NULL,
active BOOL,
content TEXT
-);
+);
-create index domainidindex on cryptokeys(domain_id);
+create index domainidindex on cryptokeys(domain_id);
create table tsigkeys (
id INTEGER PRIMARY KEY,
master VARCHAR(128) DEFAULT NULL,
last_check INTEGER DEFAULT NULL,
type VARCHAR(6) NOT NULL,
- notified_serial INTEGER DEFAULT NULL,
+ notified_serial INTEGER DEFAULT NULL,
account VARCHAR(40) DEFAULT NULL
);
CREATE TABLE records (
id INTEGER PRIMARY KEY,
domain_id INTEGER DEFAULT NULL,
- name VARCHAR(255) DEFAULT NULL,
+ name VARCHAR(255) DEFAULT NULL,
type VARCHAR(10) DEFAULT NULL,
content VARCHAR(65535) DEFAULT NULL,
ttl INTEGER DEFAULT NULL,
prio INTEGER DEFAULT NULL,
change_date INTEGER DEFAULT NULL
);
-
+
CREATE INDEX rec_name_index ON records(name);
CREATE INDEX nametype_index ON records(name,type);
CREATE INDEX domain_id ON records(domain_id);
create table supermasters (
- ip VARCHAR(64) NOT NULL,
- nameserver VARCHAR(255) NOT NULL COLLATE NOCASE,
+ ip VARCHAR(64) NOT NULL,
+ nameserver VARCHAR(255) NOT NULL COLLATE NOCASE,
account VARCHAR(40) DEFAULT NULL
);