From: Pieter Lexis Date: Tue, 2 Oct 2018 12:20:15 +0000 (+0200) Subject: builder: Kill dbconfig with fire X-Git-Tag: dnsdist-1.3.3~82 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f105b5f7d31966821945d085329b18a43908411;p=pdns builder: Kill dbconfig with fire --- diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.README.Debian b/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.README.Debian deleted file mode 100644 index f7ecae432..000000000 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.README.Debian +++ /dev/null @@ -1,18 +0,0 @@ -Instructions on setting up MySQL as a backend for PowerDNS ----------------------------------------------------------- - -PowerDNS uses dbconfig-common. The database backends offer you to -automatically create and maintain the databases for you. If you choose -yes, you're fine, no more action needed. - -Should you decide to create your databases yourself, for example, if -you decide to use a non-standard schema, please find the database -schema recommended by Upstream for MySQL in -/usr/share/dbconfig-common/data/pdns-backend-mysql/install/mysql - -Just create a database (for example, named pdns) and then feed these -SQL commands to MySQL to get some defaults to start with: - - mysql -u root -p < /usr/share/dbconfig-common/data/pdns-backend-mysql/install/mysql - -Then add your data to the database. diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.config b/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.config deleted file mode 100644 index 18ce7c2a8..000000000 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.config +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Install / upgrade database. - -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then - . /usr/share/dbconfig-common/dpkg/config.mysql - - # Default values - dbc_dbuser="pdns" - dbc_dbname="pdns" - dbc_first_version="3.0-1" - - dbc_go pdns-backend-mysql $@ -fi - -exit 0 - diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.install b/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.install index 30e35c511..4b2b28a2b 100644 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.install +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.install @@ -1,4 +1,2 @@ debian/config/pdns.local.gmysql.conf usr/share/pdns-backend-mysql -debian/sql/mysql/*.* usr/share/dbconfig-common/data/pdns-backend-mysql/upgrade/mysql/ -debian/sql/mysql/mysql usr/share/dbconfig-common/data/pdns-backend-mysql/install/ usr/lib/*/pdns/libgmysqlbackend.so* diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.postinst b/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.postinst index 59396e605..1efe63c9d 100644 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.postinst +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.postinst @@ -1,9 +1,6 @@ #!/bin/sh set -e -# Execute dbconfig-common -. /usr/share/debconf/confmodule - if [ -n "$PDNSDEBUG" ]; then echo "now debugging $0 $@" set -x @@ -50,15 +47,6 @@ if [ "$1" = "configure" ]; then fi fi - -. /usr/share/dbconfig-common/dpkg/postinst.mysql -dbc_first_version="3.0-1" -dbc_generate_include_args="-o template_infile=/usr/share/pdns-backend-mysql/pdns.local.gmysql.conf" -dbc_generate_include=template:/etc/powerdns/pdns.d/pdns.local.gmysql.conf -dbc_generate_include_owner=pdns -dbc_generate_include_perms=0640 -dbc_go $PKGNAME $@ - # Activate trigger dpkg-trigger pdns-server diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.postrm b/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.postrm index 07e2e2dc8..bba61463a 100644 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.postrm +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.postrm @@ -8,15 +8,6 @@ fi PKGNAME="pdns-backend-mysql" -# Execute dbconfig-common -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then - . /usr/share/dbconfig-common/dpkg/postrm.mysql - dbc_go pdns-backend-mysql $@ -fi - if [ "$1" = "purge" ]; then # Remove files registered with ucf. if command -v ucfq >/dev/null; then diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.prerm b/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.prerm deleted file mode 100644 index 283c36a64..000000000 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-mysql.prerm +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/prerm.mysql -dbc_go pdns-backend-mysql $@ - -#DEBHELPER# - -exit 0 diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.README.Debian b/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.README.Debian deleted file mode 100644 index 335cfc135..000000000 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.README.Debian +++ /dev/null @@ -1,26 +0,0 @@ -Instructions on setting up PostgreSQL as a backend for PowerDNS ---------------------------------------------------------------- - -PowerDNS uses dbconfig-common. The database backends offer you to -automatically create and maintain the databases for you. If you choose -yes, you're fine, no more action needed. - -Should you decide to create your databases yourself, for example, if -you decide to use a non-standard schema, please find the database -schema recommended by Upstream for PostgreSQL in -/usr/share/dbconfig-common/data/pdns-backend-pgsql/install/pgsql - -Just create a database using 'createdb' (for example named pdns) and -then feed these SQL commands to PostgreSQL to get some defaults to -start with: - - psql -h -U -f /usr/share/dbconfig-common/data/pdns-backend-pgsql/install/pgsql - -Then add your data to the database. - -*** SSL WARNING *** -Please note that SSL connections to a PostgreSQL database currently do not -work when PowerDNS is run chrooted because PowerDNS cannot access the -libssl library from within the chroot. -*** SSL WARNING *** - diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.config b/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.config deleted file mode 100644 index 2c1d00b32..000000000 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.config +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Install / upgrade database. - -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/config.pgsql - - # Default values - dbc_dbuser="pdns" - dbc_dbname="pdns" - dbc_first_version="3.0-1" - - dbc_go pdns-backend-pgsql $@ -fi - -exit 0 - diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.install b/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.install index 9ea5a52a2..85e3561b7 100644 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.install +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.install @@ -1,4 +1,2 @@ debian/config/pdns.local.gpgsql.conf usr/share/pdns-backend-pgsql -debian/sql/pgsql/*.* usr/share/dbconfig-common/data/pdns-backend-pgsql/upgrade/pgsql/ -debian/sql/pgsql/pgsql usr/share/dbconfig-common/data/pdns-backend-pgsql/install/ usr/lib/*/pdns/libgpgsqlbackend.so* diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.postinst b/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.postinst index 243027560..d4944afca 100644 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.postinst +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.postinst @@ -1,9 +1,6 @@ #!/bin/sh set -e -# Execute dbconfig-common -. /usr/share/debconf/confmodule - if [ -n "$PDNSDEBUG" ]; then echo "now debugging $0 $@" set -x @@ -46,15 +43,6 @@ if [ "$1" = "configure" ]; then fi fi -. /usr/share/dbconfig-common/dpkg/postinst.pgsql -dbc_first_version="3.0-1" -dbc_pgsql_createdb_encoding="UTF8" -dbc_generate_include_args="-o template_infile=/usr/share/pdns-backend-pgsql/pdns.local.gpgsql.conf" -dbc_generate_include=template:/etc/powerdns/pdns.d/pdns.local.gpgsql.conf -dbc_generate_include_owner=pdns -dbc_generate_include_perms=0640 -dbc_go $PKGNAME $@ - # Activate trigger dpkg-trigger pdns-server diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.postrm b/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.postrm index 8a1e11e04..26a90e61a 100644 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.postrm +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.postrm @@ -8,15 +8,6 @@ fi PKGNAME="pdns-backend-pgsql" -# Execute dbconfig-common -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/postrm.pgsql - dbc_go pdns-backend-pgsql $@ -fi - if [ "$1" = "purge" ]; then # Remove files registered with ucf. UCF="ucf" diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.prerm b/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.prerm deleted file mode 100644 index a350d8ec7..000000000 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-pgsql.prerm +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/prerm.pgsql -dbc_go pdns-backend-pgsql $@ - -#DEBHELPER# - -exit 0 diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.config b/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.config deleted file mode 100644 index c34e84caa..000000000 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.config +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Install / upgrade database. - -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -if [ -f /usr/share/dbconfig-common/dpkg/config.sqlite3 ]; then - . /usr/share/dbconfig-common/dpkg/config.sqlite3 - - # Default values - dbc_basepath=/var/lib/powerdns - dbc_dbname="pdns.sqlite3" - dbc_first_version="3.0-1" - - dbc_go pdns-backend-sqlite3 $@ -fi - -exit 0 - diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.install b/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.install index 37e8cff2c..6a0032b13 100644 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.install +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.install @@ -1,4 +1,2 @@ debian/config/pdns.local.gsqlite3.conf usr/share/pdns-backend-sqlite3 -debian/sql/sqlite3/*.* usr/share/dbconfig-common/data/pdns-backend-sqlite3/upgrade/sqlite3/ -debian/sql/sqlite3/sqlite3 usr/share/dbconfig-common/data/pdns-backend-sqlite3/install/ usr/lib/*/pdns/libgsqlite3backend.so* diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.postinst b/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.postinst index b95cabbb0..0e137377d 100644 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.postinst +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.postinst @@ -4,9 +4,6 @@ set -e -# Execute dbconfig-common -. /usr/share/debconf/confmodule - if [ -n "$PDNSDEBUG" ]; then echo "now debugging $0 $@" set -x @@ -49,16 +46,6 @@ if [ "$1" = "configure" ]; then fi fi -. /usr/share/dbconfig-common/dpkg/postinst.sqlite3 -dbc_first_version="3.0-1" -dbc_generate_include_args="-o template_infile=/usr/share/pdns-backend-sqlite3/pdns.local.gsqlite3.conf" -dbc_generate_include=template:/etc/powerdns/pdns.d/pdns.local.gsqlite3.conf -dbc_generate_include_owner=pdns -dbc_generate_include_perms=0640 -dbc_dbfile_owner=pdns:pdns -dbc_dbfile_perms=0640 -dbc_go pdns-backend-sqlite3 $@ - ucfr $PKGNAME /etc/powerdns/pdns.d/pdns.local.gsqlite3.conf dpkg-trigger pdns-server diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.postrm b/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.postrm index 47f0934ee..7fca5c191 100644 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.postrm +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.postrm @@ -8,15 +8,6 @@ fi PKGNAME="pdns-backend-sqlite3" -# Execute dbconfig-common -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -if [ -f /usr/share/dbconfig-common/dpkg/postrm.sqlite3 ]; then - . /usr/share/dbconfig-common/dpkg/postrm.sqlite3 - dbc_go pdns-backend-sqlite3 $@ -fi - if [ "$1" = "purge" ]; then # Remove files registered with ucf. if command -v ucfq >/dev/null; then diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.prerm b/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.prerm deleted file mode 100644 index bf71ca243..000000000 --- a/builder-support/debian/authoritative/debian-jessie/pdns-backend-sqlite3.prerm +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/prerm.sqlite3 -dbc_go pdns-backend-sqlite3 $@ - -#DEBHELPER# - -exit 0 diff --git a/builder-support/debian/authoritative/debian-jessie/sql/mysql/3.0-1 b/builder-support/debian/authoritative/debian-jessie/sql/mysql/3.0-1 deleted file mode 100644 index 696d495d3..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/mysql/3.0-1 +++ /dev/null @@ -1,32 +0,0 @@ -create table domainmetadata ( - id INT auto_increment, - domain_id INT NOT NULL, - kind VARCHAR(16), - content TEXT, - primary key(id) -); - -create table cryptokeys ( - id INT auto_increment, - domain_id INT NOT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT, - primary key(id) -); - -alter table records add ordername VARCHAR(255); -alter table records add auth bool; -create index orderindex on records(ordername); - -create table tsigkeys ( - id INT auto_increment, - name VARCHAR(255), - algorithm VARCHAR(255), - secret VARCHAR(255), - primary key(id) -); - -create unique index namealgoindex on tsigkeys(name, algorithm); - -alter table records change column type type VARCHAR(10); diff --git a/builder-support/debian/authoritative/debian-jessie/sql/mysql/3.3.1-4 b/builder-support/debian/authoritative/debian-jessie/sql/mysql/3.3.1-4 deleted file mode 100644 index 197062365..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/mysql/3.3.1-4 +++ /dev/null @@ -1,17 +0,0 @@ --- 3.0 to 3.1 - -ALTER TABLE records MODIFY content VARCHAR(64000); -ALTER TABLE tsigkeys MODIFY algorithm VARCHAR(50); - --- 3.1 to 3.2 -ALTER TABLE records MODIFY ordername VARCHAR(255) BINARY; -DROP INDEX orderindex ON records; -CREATE INDEX recordorder ON records (domain_id, ordername); - --- 3.2 to 3.3 -ALTER TABLE supermasters MODIFY ip VARCHAR(64); -DROP INDEX rec_name_index ON records; - --- 3.3 to 3.3.1 --- None for MySQL - diff --git a/builder-support/debian/authoritative/debian-jessie/sql/mysql/3.4.0 b/builder-support/debian/authoritative/debian-jessie/sql/mysql/3.4.0 deleted file mode 100644 index a97f5762f..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/mysql/3.4.0 +++ /dev/null @@ -1,31 +0,0 @@ --- 3.3.1 dnssec to 3.4 -ALTER TABLE records ADD disabled TINYINT(1) DEFAULT 0 AFTER change_date; -ALTER TABLE records MODIFY content VARCHAR(64000) DEFAULT NULL; -ALTER TABLE records MODIFY ordername VARCHAR(255) BINARY DEFAULT NULL; -ALTER TABLE records MODIFY auth TINYINT(1) DEFAULT 1; -ALTER TABLE records MODIFY type VARCHAR(10); -ALTER TABLE supermasters MODIFY ip VARCHAR(64) NOT NULL; -ALTER TABLE supermasters ADD PRIMARY KEY(ip, nameserver); -ALTER TABLE supermasters MODIFY account VARCHAR(40) NOT NULL; -ALTER TABLE domainmetadata MODIFY kind VARCHAR(32); -ALTER TABLE tsigkeys MODIFY algorithm VARCHAR(50); -ALTER TABLE domainmetadata ENGINE=InnoDB; -ALTER TABLE cryptokeys ENGINE=InnoDB; -ALTER TABLE tsigkeys ENGINE=InnoDB; - -CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind); - -CREATE TABLE comments ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) NOT NULL, - comment VARCHAR(64000) NOT NULL, - PRIMARY KEY(id) -) Engine=InnoDB; - -CREATE INDEX comments_domain_id_idx ON comments (domain_id); -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); diff --git a/builder-support/debian/authoritative/debian-jessie/sql/mysql/4.0.1-6 b/builder-support/debian/authoritative/debian-jessie/sql/mysql/4.0.1-6 deleted file mode 100644 index d6140a302..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/mysql/4.0.1-6 +++ /dev/null @@ -1,21 +0,0 @@ --- MariaDB default index size and default character set causes the --- name indexes to fail to create. Therefore we are overriding the --- character set to something smaller than the insane utf8mb4 def. - -ALTER TABLE domains CONVERT TO CHARACTER SET 'latin1'; -ALTER TABLE domains MODIFY account VARCHAR(40) CHARACTER SET 'utf8' DEFAULT NULL; - -ALTER TABLE records CONVERT TO CHARACTER SET 'latin1'; - -ALTER TABLE supermasters CONVERT TO CHARACTER SET 'latin1'; -ALTER TABLE supermasters MODIFY account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL; - -ALTER TABLE comments CONVERT TO CHARACTER SET 'latin1'; -ALTER TABLE comments MODIFY account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL; -ALTER TABLE comments MODIFY comment TEXT CHARACTER SET 'utf8' NOT NULL; - -ALTER TABLE domainmetadata CONVERT TO CHARACTER SET 'latin1'; - -ALTER TABLE cryptokeys CONVERT TO CHARACTER SET 'latin1'; - -ALTER TABLE tsigkeys CONVERT TO CHARACTER SET 'latin1'; diff --git a/builder-support/debian/authoritative/debian-jessie/sql/mysql/4.0.3-1 b/builder-support/debian/authoritative/debian-jessie/sql/mysql/4.0.3-1 deleted file mode 100644 index c63c75348..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/mysql/4.0.3-1 +++ /dev/null @@ -1,3 +0,0 @@ --- Use TEXT in place of VARCHAR(64000) for compatibility with mysql 5.6 and mariadb. --- pdns 4.0.1, 4.0.2 got this wrong. -ALTER TABLE comments MODIFY comment TEXT CHARACTER SET 'utf8' NOT NULL; diff --git a/builder-support/debian/authoritative/debian-jessie/sql/mysql/4.1.0-1 b/builder-support/debian/authoritative/debian-jessie/sql/mysql/4.1.0-1 deleted file mode 100644 index acd9ce3cc..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/mysql/4.1.0-1 +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE records MODIFY id BIGINT AUTO_INCREMENT; -CREATE INDEX ordername ON records (ordername); -DROP INDEX recordorder ON records; - -DROP INDEX comments_domain_id_idx ON comments; diff --git a/builder-support/debian/authoritative/debian-jessie/sql/mysql/mysql b/builder-support/debian/authoritative/debian-jessie/sql/mysql/mysql deleted file mode 100644 index 455de0b1d..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/mysql/mysql +++ /dev/null @@ -1,93 +0,0 @@ --- MariaDB default index size and default character set causes the --- name indexes to fail to create. Therefore we are overriding the --- character set to something smaller than the insane utf8mb4 def. - -CREATE TABLE domains ( - id INT AUTO_INCREMENT, - name VARCHAR(255) NOT NULL, - master VARCHAR(128) DEFAULT NULL, - last_check INT DEFAULT NULL, - type VARCHAR(6) NOT NULL, - notified_serial INT DEFAULT NULL, - account VARCHAR(40) CHARACTER SET 'utf8' DEFAULT NULL, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE UNIQUE INDEX name_index ON domains(name); - - -CREATE TABLE records ( - id BIGINT AUTO_INCREMENT, - domain_id INT DEFAULT NULL, - name VARCHAR(255) DEFAULT NULL, - type VARCHAR(10) DEFAULT NULL, - content VARCHAR(64000) DEFAULT NULL, - ttl INT DEFAULT NULL, - prio INT DEFAULT NULL, - change_date INT DEFAULT NULL, - disabled TINYINT(1) DEFAULT 0, - ordername VARCHAR(255) BINARY DEFAULT NULL, - auth TINYINT(1) DEFAULT 1, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX nametype_index ON records(name,type); -CREATE INDEX domain_id ON records(domain_id); -CREATE INDEX ordername ON records (ordername); - - -CREATE TABLE supermasters ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL, - account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL, - PRIMARY KEY (ip, nameserver) -) Engine=InnoDB CHARACTER SET 'latin1'; - - -CREATE TABLE comments ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL, - comment TEXT CHARACTER SET 'utf8' NOT NULL, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -CREATE TABLE domainmetadata ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - kind VARCHAR(32), - content TEXT, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind); - - -CREATE TABLE cryptokeys ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT, - PRIMARY KEY(id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX domainidindex ON cryptokeys(domain_id); - - -CREATE TABLE tsigkeys ( - id INT AUTO_INCREMENT, - name VARCHAR(255), - algorithm VARCHAR(50), - secret VARCHAR(255), - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); diff --git a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.0-1 b/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.0-1 deleted file mode 100644 index a508e7aae..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.0-1 +++ /dev/null @@ -1,29 +0,0 @@ -alter table records add ordername VARCHAR(255); -alter table records add auth bool; -create index orderindex on records(ordername); - -create table domainmetadata ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - kind VARCHAR(16), - content TEXT -); - -create table cryptokeys ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -create table tsigkeys ( - id SERIAL PRIMARY KEY, - name VARCHAR(255), - algorithm VARCHAR(255), - secret VARCHAR(255) -); - -create unique index namealgoindex on tsigkeys(name, algorithm); - -alter table records alter column type type VARCHAR(10); diff --git a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.3-1 b/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.3-1 deleted file mode 100644 index d5be011c3..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.3-1 +++ /dev/null @@ -1,26 +0,0 @@ --- Change master VARCHAR(20) -> VARCHAR(255) -ALTER TABLE domains ALTER COLUMN master TYPE VARCHAR(255); - --- Change content VARCHAR(255) -> VARCHAR(65535) -ALTER TABLE records ALTER COLUMN content TYPE VARCHAR(65535); - --- Lowercase the name column and add a lowercase constraint check -UPDATE records SET name=lower(name); -ALTER TABLE records ADD CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text))); - --- Change ip VARCHAR(25) -> VARCHAR(64) -ALTER TABLE supermasters ALTER COLUMN ip TYPE VARCHAR(64); - --- Recreate index -DROP INDEX IF EXISTS orderindex; -CREATE INDEX recordorder ON records (domain_id, ordername text_pattern_ops); - --- Create an index on domainmetadata -CREATE INDEX domainidmetaindex ON domainmetadata(domain_id); - --- Create an index on cryptokeys -CREATE INDEX domainidindex ON cryptokeys(domain_id); - --- Change algorithm VARCHAR(255) -> VARCHAR(50) -ALTER TABLE tsigkeys ALTER COLUMN algorithm TYPE VARCHAR(50); - diff --git a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.3.1-4 b/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.3.1-4 deleted file mode 100644 index 417184dba..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.3.1-4 +++ /dev/null @@ -1,4 +0,0 @@ --- 3.3 to 3.3.1 -ALTER TABLE domains ADD CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text))); -ALTER TABLE tsigkeys ADD CONSTRAINT c_lowercase_name check (((name)::text = lower((name)::text))); - diff --git a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.4.0 b/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.4.0 deleted file mode 100644 index 121bed5ec..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/3.4.0 +++ /dev/null @@ -1,35 +0,0 @@ --- 3.3.1 to 3.4 -ALTER TABLE records ADD disabled BOOL DEFAULT 'f'; -ALTER TABLE records ALTER COLUMN content TYPE VARCHAR(65535); -ALTER TABLE records ALTER COLUMN auth SET DEFAULT 't'; -ALTER TABLE records ALTER COLUMN type TYPE VARCHAR(10); -ALTER TABLE supermasters ALTER COLUMN ip TYPE INET USING ip::INET; -ALTER TABLE supermasters ALTER COLUMN account SET DEFAULT NOT NULL; -ALTER TABLE supermasters ADD CONSTRAINT supermasters_pkey PRIMARY KEY (ip, nameserver); -ALTER TABLE domainmetadata ALTER COLUMN kind TYPE VARCHAR(32); -ALTER TABLE tsigkeys ALTER COLUMN algorithm TYPE VARCHAR(50); - --- recordorder was already in our 3.3.1 upgrade scripts, so drop it if needed -DROP INDEX IF EXISTS recordorder; - -CREATE INDEX recordorder ON records (domain_id, ordername text_pattern_ops); -DROP INDEX IF EXISTS orderindex; - - -CREATE TABLE comments ( - id SERIAL PRIMARY KEY, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL, - CONSTRAINT domain_exists - FOREIGN KEY(domain_id) REFERENCES domains(id) - ON DELETE CASCADE, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE INDEX comments_domain_id_idx ON comments (domain_id); -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); diff --git a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/4.1.0-1 b/builder-support/debian/authoritative/debian-jessie/sql/pgsql/4.1.0-1 deleted file mode 100644 index 6c4f660a1..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/4.1.0-1 +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE records ALTER id TYPE BIGINT; diff --git a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/pgsql b/builder-support/debian/authoritative/debian-jessie/sql/pgsql/pgsql deleted file mode 100644 index b105d8795..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/pgsql/pgsql +++ /dev/null @@ -1,95 +0,0 @@ -CREATE TABLE domains ( - id SERIAL PRIMARY KEY, - name VARCHAR(255) NOT NULL, - master VARCHAR(128) DEFAULT NULL, - last_check INT DEFAULT NULL, - type VARCHAR(6) NOT NULL, - notified_serial INT DEFAULT NULL, - account VARCHAR(40) DEFAULT NULL, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE UNIQUE INDEX name_index ON domains(name); - - -CREATE TABLE records ( - id BIGSERIAL PRIMARY KEY, - domain_id INT DEFAULT NULL, - name VARCHAR(255) DEFAULT NULL, - type VARCHAR(10) DEFAULT NULL, - content VARCHAR(65535) DEFAULT NULL, - ttl INT DEFAULT NULL, - prio INT DEFAULT NULL, - change_date INT DEFAULT NULL, - disabled BOOL DEFAULT 'f', - ordername VARCHAR(255), - auth BOOL DEFAULT 't', - CONSTRAINT domain_exists - FOREIGN KEY(domain_id) REFERENCES domains(id) - ON DELETE CASCADE, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -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 INDEX recordorder ON records (domain_id, ordername text_pattern_ops); - - -CREATE TABLE supermasters ( - ip INET NOT NULL, - nameserver VARCHAR(255) NOT NULL, - account VARCHAR(40) NOT NULL, - PRIMARY KEY(ip, nameserver) -); - - -CREATE TABLE comments ( - id SERIAL PRIMARY KEY, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL, - CONSTRAINT domain_exists - FOREIGN KEY(domain_id) REFERENCES domains(id) - ON DELETE CASCADE, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE INDEX comments_domain_id_idx ON comments (domain_id); -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -CREATE TABLE domainmetadata ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - kind VARCHAR(32), - content TEXT -); - -CREATE INDEX domainidmetaindex ON domainmetadata(domain_id); - - -CREATE TABLE cryptokeys ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -CREATE INDEX domainidindex ON cryptokeys(domain_id); - - -CREATE TABLE tsigkeys ( - id SERIAL PRIMARY KEY, - name VARCHAR(255), - algorithm VARCHAR(50), - secret VARCHAR(255), - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); diff --git a/builder-support/debian/authoritative/debian-jessie/sql/sqlite3/3.0-1 b/builder-support/debian/authoritative/debian-jessie/sql/sqlite3/3.0-1 deleted file mode 100644 index 147133906..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/sqlite3/3.0-1 +++ /dev/null @@ -1,27 +0,0 @@ -alter table records add ordername VARCHAR(255); -alter table records add auth bool; -create index orderindex on records(ordername); - -create table domainmetadata ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(16) COLLATE NOCASE, - content TEXT -); - -create table cryptokeys ( - id INTEGER PRIMARY KEY, - domain_id INT DEFAULT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -create table tsigkeys ( - id INTEGER PRIMARY KEY, - name VARCHAR(255) COLLATE NOCASE, - algorithm VARCHAR(255) COLLATE NOCASE, - secret VARCHAR(255) -); - -create unique index namealgoindex on tsigkeys(name, algorithm); diff --git a/builder-support/debian/authoritative/debian-jessie/sql/sqlite3/3.4.0 b/builder-support/debian/authoritative/debian-jessie/sql/sqlite3/3.4.0 deleted file mode 100644 index 3d884905c..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/sqlite3/3.4.0 +++ /dev/null @@ -1,103 +0,0 @@ --- 3.x to 3.4 - -CREATE TABLE comments ( - id INTEGER PRIMARY KEY, - domain_id INTEGER NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL -); - -CREATE INDEX comments_domain_id_index ON comments (domain_id); -CREATE INDEX comments_nametype_index ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -BEGIN TRANSACTION; - CREATE TEMPORARY TABLE records_backup( - id INTEGER PRIMARY KEY, - domain_id INTEGER 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, - ordername VARCHAR(255), - auth BOOL DEFAULT 1 - ); - - INSERT INTO records_backup SELECT id,domain_id,name,type,content,ttl,prio,change_date,ordername,auth FROM records; - DROP TABLE records; - - CREATE TABLE records ( - id INTEGER PRIMARY KEY, - domain_id INTEGER 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, - disabled BOOLEAN DEFAULT 0, - ordername VARCHAR(255), - auth BOOL DEFAULT 1 - ); - - 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 INDEX orderindex ON records(ordername); - - INSERT INTO records SELECT id,domain_id,name,type,content,ttl,prio,change_date,0,ordername,auth FROM records_backup; - DROP TABLE records_backup; -COMMIT; - - -BEGIN TRANSACTION; - CREATE TEMPORARY TABLE supermasters_backup ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL COLLATE NOCASE, - account VARCHAR(40) DEFAULT NULL - ); - - INSERT INTO supermasters_backup SELECT ip,nameserver,account FROM supermasters; - UPDATE supermasters_backup SET account='' WHERE account IS NULL; - DROP TABLE supermasters; - - CREATE TABLE supermasters ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL COLLATE NOCASE, - account VARCHAR(40) NOT NULL - ); - CREATE UNIQUE INDEX ip_nameserver_pk ON supermasters(ip, nameserver); - - INSERT INTO supermasters SELECT ip,nameserver,account FROM supermasters_backup; - DROP TABLE supermasters_backup; -COMMIT; - - -BEGIN TRANSACTION; - CREATE TABLE domainmetadata_backup ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(32) COLLATE NOCASE, - content TEXT - ); - - INSERT INTO domainmetadata_backup SELECT id,domain_id,kind,content FROM domainmetadata; - DROP TABLE domainmetadata; - - CREATE TABLE domainmetadata ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(32) COLLATE NOCASE, - content TEXT - ); - CREATE INDEX domainmetaidindex ON domainmetadata(domain_id); - - INSERT INTO domainmetadata SELECT id,domain_id,kind,content FROM domainmetadata_backup; - DROP TABLE domainmetadata_backup; -COMMIT; diff --git a/builder-support/debian/authoritative/debian-jessie/sql/sqlite3/sqlite3 b/builder-support/debian/authoritative/debian-jessie/sql/sqlite3/sqlite3 deleted file mode 100644 index 7cdd2b878..000000000 --- a/builder-support/debian/authoritative/debian-jessie/sql/sqlite3/sqlite3 +++ /dev/null @@ -1,86 +0,0 @@ -CREATE TABLE domains ( - id INTEGER PRIMARY KEY, - name VARCHAR(255) NOT NULL COLLATE NOCASE, - master VARCHAR(128) DEFAULT NULL, - last_check INTEGER DEFAULT NULL, - type VARCHAR(6) NOT NULL, - notified_serial INTEGER DEFAULT NULL, - account VARCHAR(40) DEFAULT NULL -); - -CREATE UNIQUE INDEX name_index ON domains(name); - - -CREATE TABLE records ( - id INTEGER PRIMARY KEY, - domain_id INTEGER 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, - disabled BOOLEAN DEFAULT 0, - ordername VARCHAR(255), - auth BOOL DEFAULT 1 -); - -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 INDEX orderindex ON records(ordername); - - -CREATE TABLE supermasters ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL COLLATE NOCASE, - account VARCHAR(40) NOT NULL -); - -CREATE UNIQUE INDEX ip_nameserver_pk ON supermasters(ip, nameserver); - - -CREATE TABLE comments ( - id INTEGER PRIMARY KEY, - domain_id INTEGER NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL -); - -CREATE INDEX comments_domain_id_index ON comments (domain_id); -CREATE INDEX comments_nametype_index ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -CREATE TABLE domainmetadata ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(32) COLLATE NOCASE, - content TEXT -); - -CREATE INDEX domainmetaidindex ON domainmetadata(domain_id); - - -CREATE TABLE cryptokeys ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -CREATE INDEX domainidindex ON cryptokeys(domain_id); - - -CREATE TABLE tsigkeys ( - id INTEGER PRIMARY KEY, - name VARCHAR(255) COLLATE NOCASE, - algorithm VARCHAR(50) COLLATE NOCASE, - secret VARCHAR(255) -); - -CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.README.Debian b/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.README.Debian deleted file mode 100644 index f7ecae432..000000000 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.README.Debian +++ /dev/null @@ -1,18 +0,0 @@ -Instructions on setting up MySQL as a backend for PowerDNS ----------------------------------------------------------- - -PowerDNS uses dbconfig-common. The database backends offer you to -automatically create and maintain the databases for you. If you choose -yes, you're fine, no more action needed. - -Should you decide to create your databases yourself, for example, if -you decide to use a non-standard schema, please find the database -schema recommended by Upstream for MySQL in -/usr/share/dbconfig-common/data/pdns-backend-mysql/install/mysql - -Just create a database (for example, named pdns) and then feed these -SQL commands to MySQL to get some defaults to start with: - - mysql -u root -p < /usr/share/dbconfig-common/data/pdns-backend-mysql/install/mysql - -Then add your data to the database. diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.config b/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.config deleted file mode 100644 index 18ce7c2a8..000000000 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.config +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Install / upgrade database. - -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then - . /usr/share/dbconfig-common/dpkg/config.mysql - - # Default values - dbc_dbuser="pdns" - dbc_dbname="pdns" - dbc_first_version="3.0-1" - - dbc_go pdns-backend-mysql $@ -fi - -exit 0 - diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.install b/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.install index 30e35c511..4b2b28a2b 100644 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.install +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.install @@ -1,4 +1,2 @@ debian/config/pdns.local.gmysql.conf usr/share/pdns-backend-mysql -debian/sql/mysql/*.* usr/share/dbconfig-common/data/pdns-backend-mysql/upgrade/mysql/ -debian/sql/mysql/mysql usr/share/dbconfig-common/data/pdns-backend-mysql/install/ usr/lib/*/pdns/libgmysqlbackend.so* diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.postinst b/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.postinst index 59396e605..ebc956b36 100644 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.postinst +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.postinst @@ -1,9 +1,6 @@ #!/bin/sh set -e -# Execute dbconfig-common -. /usr/share/debconf/confmodule - if [ -n "$PDNSDEBUG" ]; then echo "now debugging $0 $@" set -x @@ -51,14 +48,6 @@ if [ "$1" = "configure" ]; then fi -. /usr/share/dbconfig-common/dpkg/postinst.mysql -dbc_first_version="3.0-1" -dbc_generate_include_args="-o template_infile=/usr/share/pdns-backend-mysql/pdns.local.gmysql.conf" -dbc_generate_include=template:/etc/powerdns/pdns.d/pdns.local.gmysql.conf -dbc_generate_include_owner=pdns -dbc_generate_include_perms=0640 -dbc_go $PKGNAME $@ - # Activate trigger dpkg-trigger pdns-server diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.postrm b/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.postrm index 07e2e2dc8..bba61463a 100644 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.postrm +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.postrm @@ -8,15 +8,6 @@ fi PKGNAME="pdns-backend-mysql" -# Execute dbconfig-common -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then - . /usr/share/dbconfig-common/dpkg/postrm.mysql - dbc_go pdns-backend-mysql $@ -fi - if [ "$1" = "purge" ]; then # Remove files registered with ucf. if command -v ucfq >/dev/null; then diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.prerm b/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.prerm deleted file mode 100644 index 283c36a64..000000000 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-mysql.prerm +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/prerm.mysql -dbc_go pdns-backend-mysql $@ - -#DEBHELPER# - -exit 0 diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.README.Debian b/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.README.Debian deleted file mode 100644 index 335cfc135..000000000 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.README.Debian +++ /dev/null @@ -1,26 +0,0 @@ -Instructions on setting up PostgreSQL as a backend for PowerDNS ---------------------------------------------------------------- - -PowerDNS uses dbconfig-common. The database backends offer you to -automatically create and maintain the databases for you. If you choose -yes, you're fine, no more action needed. - -Should you decide to create your databases yourself, for example, if -you decide to use a non-standard schema, please find the database -schema recommended by Upstream for PostgreSQL in -/usr/share/dbconfig-common/data/pdns-backend-pgsql/install/pgsql - -Just create a database using 'createdb' (for example named pdns) and -then feed these SQL commands to PostgreSQL to get some defaults to -start with: - - psql -h -U -f /usr/share/dbconfig-common/data/pdns-backend-pgsql/install/pgsql - -Then add your data to the database. - -*** SSL WARNING *** -Please note that SSL connections to a PostgreSQL database currently do not -work when PowerDNS is run chrooted because PowerDNS cannot access the -libssl library from within the chroot. -*** SSL WARNING *** - diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.config b/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.config deleted file mode 100644 index 2c1d00b32..000000000 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.config +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Install / upgrade database. - -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/config.pgsql - - # Default values - dbc_dbuser="pdns" - dbc_dbname="pdns" - dbc_first_version="3.0-1" - - dbc_go pdns-backend-pgsql $@ -fi - -exit 0 - diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.install b/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.install index 9ea5a52a2..85e3561b7 100644 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.install +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.install @@ -1,4 +1,2 @@ debian/config/pdns.local.gpgsql.conf usr/share/pdns-backend-pgsql -debian/sql/pgsql/*.* usr/share/dbconfig-common/data/pdns-backend-pgsql/upgrade/pgsql/ -debian/sql/pgsql/pgsql usr/share/dbconfig-common/data/pdns-backend-pgsql/install/ usr/lib/*/pdns/libgpgsqlbackend.so* diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.postinst b/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.postinst index 243027560..d4944afca 100644 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.postinst +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.postinst @@ -1,9 +1,6 @@ #!/bin/sh set -e -# Execute dbconfig-common -. /usr/share/debconf/confmodule - if [ -n "$PDNSDEBUG" ]; then echo "now debugging $0 $@" set -x @@ -46,15 +43,6 @@ if [ "$1" = "configure" ]; then fi fi -. /usr/share/dbconfig-common/dpkg/postinst.pgsql -dbc_first_version="3.0-1" -dbc_pgsql_createdb_encoding="UTF8" -dbc_generate_include_args="-o template_infile=/usr/share/pdns-backend-pgsql/pdns.local.gpgsql.conf" -dbc_generate_include=template:/etc/powerdns/pdns.d/pdns.local.gpgsql.conf -dbc_generate_include_owner=pdns -dbc_generate_include_perms=0640 -dbc_go $PKGNAME $@ - # Activate trigger dpkg-trigger pdns-server diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.postrm b/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.postrm index 8a1e11e04..26a90e61a 100644 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.postrm +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.postrm @@ -8,15 +8,6 @@ fi PKGNAME="pdns-backend-pgsql" -# Execute dbconfig-common -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/postrm.pgsql - dbc_go pdns-backend-pgsql $@ -fi - if [ "$1" = "purge" ]; then # Remove files registered with ucf. UCF="ucf" diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.prerm b/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.prerm deleted file mode 100644 index a350d8ec7..000000000 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-pgsql.prerm +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/prerm.pgsql -dbc_go pdns-backend-pgsql $@ - -#DEBHELPER# - -exit 0 diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.config b/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.config deleted file mode 100644 index c34e84caa..000000000 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.config +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Install / upgrade database. - -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -if [ -f /usr/share/dbconfig-common/dpkg/config.sqlite3 ]; then - . /usr/share/dbconfig-common/dpkg/config.sqlite3 - - # Default values - dbc_basepath=/var/lib/powerdns - dbc_dbname="pdns.sqlite3" - dbc_first_version="3.0-1" - - dbc_go pdns-backend-sqlite3 $@ -fi - -exit 0 - diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.install b/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.install index 37e8cff2c..6a0032b13 100644 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.install +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.install @@ -1,4 +1,2 @@ debian/config/pdns.local.gsqlite3.conf usr/share/pdns-backend-sqlite3 -debian/sql/sqlite3/*.* usr/share/dbconfig-common/data/pdns-backend-sqlite3/upgrade/sqlite3/ -debian/sql/sqlite3/sqlite3 usr/share/dbconfig-common/data/pdns-backend-sqlite3/install/ usr/lib/*/pdns/libgsqlite3backend.so* diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.postinst b/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.postinst index b95cabbb0..0e137377d 100644 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.postinst +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.postinst @@ -4,9 +4,6 @@ set -e -# Execute dbconfig-common -. /usr/share/debconf/confmodule - if [ -n "$PDNSDEBUG" ]; then echo "now debugging $0 $@" set -x @@ -49,16 +46,6 @@ if [ "$1" = "configure" ]; then fi fi -. /usr/share/dbconfig-common/dpkg/postinst.sqlite3 -dbc_first_version="3.0-1" -dbc_generate_include_args="-o template_infile=/usr/share/pdns-backend-sqlite3/pdns.local.gsqlite3.conf" -dbc_generate_include=template:/etc/powerdns/pdns.d/pdns.local.gsqlite3.conf -dbc_generate_include_owner=pdns -dbc_generate_include_perms=0640 -dbc_dbfile_owner=pdns:pdns -dbc_dbfile_perms=0640 -dbc_go pdns-backend-sqlite3 $@ - ucfr $PKGNAME /etc/powerdns/pdns.d/pdns.local.gsqlite3.conf dpkg-trigger pdns-server diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.postrm b/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.postrm index 47f0934ee..7fca5c191 100644 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.postrm +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.postrm @@ -8,15 +8,6 @@ fi PKGNAME="pdns-backend-sqlite3" -# Execute dbconfig-common -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -if [ -f /usr/share/dbconfig-common/dpkg/postrm.sqlite3 ]; then - . /usr/share/dbconfig-common/dpkg/postrm.sqlite3 - dbc_go pdns-backend-sqlite3 $@ -fi - if [ "$1" = "purge" ]; then # Remove files registered with ucf. if command -v ucfq >/dev/null; then diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.prerm b/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.prerm deleted file mode 100644 index bf71ca243..000000000 --- a/builder-support/debian/authoritative/debian-stretch/pdns-backend-sqlite3.prerm +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/prerm.sqlite3 -dbc_go pdns-backend-sqlite3 $@ - -#DEBHELPER# - -exit 0 diff --git a/builder-support/debian/authoritative/debian-stretch/sql/mysql/3.0-1 b/builder-support/debian/authoritative/debian-stretch/sql/mysql/3.0-1 deleted file mode 100644 index 696d495d3..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/mysql/3.0-1 +++ /dev/null @@ -1,32 +0,0 @@ -create table domainmetadata ( - id INT auto_increment, - domain_id INT NOT NULL, - kind VARCHAR(16), - content TEXT, - primary key(id) -); - -create table cryptokeys ( - id INT auto_increment, - domain_id INT NOT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT, - primary key(id) -); - -alter table records add ordername VARCHAR(255); -alter table records add auth bool; -create index orderindex on records(ordername); - -create table tsigkeys ( - id INT auto_increment, - name VARCHAR(255), - algorithm VARCHAR(255), - secret VARCHAR(255), - primary key(id) -); - -create unique index namealgoindex on tsigkeys(name, algorithm); - -alter table records change column type type VARCHAR(10); diff --git a/builder-support/debian/authoritative/debian-stretch/sql/mysql/3.3.1-4 b/builder-support/debian/authoritative/debian-stretch/sql/mysql/3.3.1-4 deleted file mode 100644 index 197062365..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/mysql/3.3.1-4 +++ /dev/null @@ -1,17 +0,0 @@ --- 3.0 to 3.1 - -ALTER TABLE records MODIFY content VARCHAR(64000); -ALTER TABLE tsigkeys MODIFY algorithm VARCHAR(50); - --- 3.1 to 3.2 -ALTER TABLE records MODIFY ordername VARCHAR(255) BINARY; -DROP INDEX orderindex ON records; -CREATE INDEX recordorder ON records (domain_id, ordername); - --- 3.2 to 3.3 -ALTER TABLE supermasters MODIFY ip VARCHAR(64); -DROP INDEX rec_name_index ON records; - --- 3.3 to 3.3.1 --- None for MySQL - diff --git a/builder-support/debian/authoritative/debian-stretch/sql/mysql/3.4.0 b/builder-support/debian/authoritative/debian-stretch/sql/mysql/3.4.0 deleted file mode 100644 index a97f5762f..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/mysql/3.4.0 +++ /dev/null @@ -1,31 +0,0 @@ --- 3.3.1 dnssec to 3.4 -ALTER TABLE records ADD disabled TINYINT(1) DEFAULT 0 AFTER change_date; -ALTER TABLE records MODIFY content VARCHAR(64000) DEFAULT NULL; -ALTER TABLE records MODIFY ordername VARCHAR(255) BINARY DEFAULT NULL; -ALTER TABLE records MODIFY auth TINYINT(1) DEFAULT 1; -ALTER TABLE records MODIFY type VARCHAR(10); -ALTER TABLE supermasters MODIFY ip VARCHAR(64) NOT NULL; -ALTER TABLE supermasters ADD PRIMARY KEY(ip, nameserver); -ALTER TABLE supermasters MODIFY account VARCHAR(40) NOT NULL; -ALTER TABLE domainmetadata MODIFY kind VARCHAR(32); -ALTER TABLE tsigkeys MODIFY algorithm VARCHAR(50); -ALTER TABLE domainmetadata ENGINE=InnoDB; -ALTER TABLE cryptokeys ENGINE=InnoDB; -ALTER TABLE tsigkeys ENGINE=InnoDB; - -CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind); - -CREATE TABLE comments ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) NOT NULL, - comment VARCHAR(64000) NOT NULL, - PRIMARY KEY(id) -) Engine=InnoDB; - -CREATE INDEX comments_domain_id_idx ON comments (domain_id); -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); diff --git a/builder-support/debian/authoritative/debian-stretch/sql/mysql/4.0.1-6 b/builder-support/debian/authoritative/debian-stretch/sql/mysql/4.0.1-6 deleted file mode 100644 index d6140a302..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/mysql/4.0.1-6 +++ /dev/null @@ -1,21 +0,0 @@ --- MariaDB default index size and default character set causes the --- name indexes to fail to create. Therefore we are overriding the --- character set to something smaller than the insane utf8mb4 def. - -ALTER TABLE domains CONVERT TO CHARACTER SET 'latin1'; -ALTER TABLE domains MODIFY account VARCHAR(40) CHARACTER SET 'utf8' DEFAULT NULL; - -ALTER TABLE records CONVERT TO CHARACTER SET 'latin1'; - -ALTER TABLE supermasters CONVERT TO CHARACTER SET 'latin1'; -ALTER TABLE supermasters MODIFY account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL; - -ALTER TABLE comments CONVERT TO CHARACTER SET 'latin1'; -ALTER TABLE comments MODIFY account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL; -ALTER TABLE comments MODIFY comment TEXT CHARACTER SET 'utf8' NOT NULL; - -ALTER TABLE domainmetadata CONVERT TO CHARACTER SET 'latin1'; - -ALTER TABLE cryptokeys CONVERT TO CHARACTER SET 'latin1'; - -ALTER TABLE tsigkeys CONVERT TO CHARACTER SET 'latin1'; diff --git a/builder-support/debian/authoritative/debian-stretch/sql/mysql/4.0.3-1 b/builder-support/debian/authoritative/debian-stretch/sql/mysql/4.0.3-1 deleted file mode 100644 index c63c75348..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/mysql/4.0.3-1 +++ /dev/null @@ -1,3 +0,0 @@ --- Use TEXT in place of VARCHAR(64000) for compatibility with mysql 5.6 and mariadb. --- pdns 4.0.1, 4.0.2 got this wrong. -ALTER TABLE comments MODIFY comment TEXT CHARACTER SET 'utf8' NOT NULL; diff --git a/builder-support/debian/authoritative/debian-stretch/sql/mysql/4.1.0-1 b/builder-support/debian/authoritative/debian-stretch/sql/mysql/4.1.0-1 deleted file mode 100644 index acd9ce3cc..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/mysql/4.1.0-1 +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE records MODIFY id BIGINT AUTO_INCREMENT; -CREATE INDEX ordername ON records (ordername); -DROP INDEX recordorder ON records; - -DROP INDEX comments_domain_id_idx ON comments; diff --git a/builder-support/debian/authoritative/debian-stretch/sql/mysql/mysql b/builder-support/debian/authoritative/debian-stretch/sql/mysql/mysql deleted file mode 100644 index 455de0b1d..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/mysql/mysql +++ /dev/null @@ -1,93 +0,0 @@ --- MariaDB default index size and default character set causes the --- name indexes to fail to create. Therefore we are overriding the --- character set to something smaller than the insane utf8mb4 def. - -CREATE TABLE domains ( - id INT AUTO_INCREMENT, - name VARCHAR(255) NOT NULL, - master VARCHAR(128) DEFAULT NULL, - last_check INT DEFAULT NULL, - type VARCHAR(6) NOT NULL, - notified_serial INT DEFAULT NULL, - account VARCHAR(40) CHARACTER SET 'utf8' DEFAULT NULL, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE UNIQUE INDEX name_index ON domains(name); - - -CREATE TABLE records ( - id BIGINT AUTO_INCREMENT, - domain_id INT DEFAULT NULL, - name VARCHAR(255) DEFAULT NULL, - type VARCHAR(10) DEFAULT NULL, - content VARCHAR(64000) DEFAULT NULL, - ttl INT DEFAULT NULL, - prio INT DEFAULT NULL, - change_date INT DEFAULT NULL, - disabled TINYINT(1) DEFAULT 0, - ordername VARCHAR(255) BINARY DEFAULT NULL, - auth TINYINT(1) DEFAULT 1, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX nametype_index ON records(name,type); -CREATE INDEX domain_id ON records(domain_id); -CREATE INDEX ordername ON records (ordername); - - -CREATE TABLE supermasters ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL, - account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL, - PRIMARY KEY (ip, nameserver) -) Engine=InnoDB CHARACTER SET 'latin1'; - - -CREATE TABLE comments ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL, - comment TEXT CHARACTER SET 'utf8' NOT NULL, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -CREATE TABLE domainmetadata ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - kind VARCHAR(32), - content TEXT, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind); - - -CREATE TABLE cryptokeys ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT, - PRIMARY KEY(id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX domainidindex ON cryptokeys(domain_id); - - -CREATE TABLE tsigkeys ( - id INT AUTO_INCREMENT, - name VARCHAR(255), - algorithm VARCHAR(50), - secret VARCHAR(255), - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); diff --git a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.0-1 b/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.0-1 deleted file mode 100644 index a508e7aae..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.0-1 +++ /dev/null @@ -1,29 +0,0 @@ -alter table records add ordername VARCHAR(255); -alter table records add auth bool; -create index orderindex on records(ordername); - -create table domainmetadata ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - kind VARCHAR(16), - content TEXT -); - -create table cryptokeys ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -create table tsigkeys ( - id SERIAL PRIMARY KEY, - name VARCHAR(255), - algorithm VARCHAR(255), - secret VARCHAR(255) -); - -create unique index namealgoindex on tsigkeys(name, algorithm); - -alter table records alter column type type VARCHAR(10); diff --git a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.3-1 b/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.3-1 deleted file mode 100644 index d5be011c3..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.3-1 +++ /dev/null @@ -1,26 +0,0 @@ --- Change master VARCHAR(20) -> VARCHAR(255) -ALTER TABLE domains ALTER COLUMN master TYPE VARCHAR(255); - --- Change content VARCHAR(255) -> VARCHAR(65535) -ALTER TABLE records ALTER COLUMN content TYPE VARCHAR(65535); - --- Lowercase the name column and add a lowercase constraint check -UPDATE records SET name=lower(name); -ALTER TABLE records ADD CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text))); - --- Change ip VARCHAR(25) -> VARCHAR(64) -ALTER TABLE supermasters ALTER COLUMN ip TYPE VARCHAR(64); - --- Recreate index -DROP INDEX IF EXISTS orderindex; -CREATE INDEX recordorder ON records (domain_id, ordername text_pattern_ops); - --- Create an index on domainmetadata -CREATE INDEX domainidmetaindex ON domainmetadata(domain_id); - --- Create an index on cryptokeys -CREATE INDEX domainidindex ON cryptokeys(domain_id); - --- Change algorithm VARCHAR(255) -> VARCHAR(50) -ALTER TABLE tsigkeys ALTER COLUMN algorithm TYPE VARCHAR(50); - diff --git a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.3.1-4 b/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.3.1-4 deleted file mode 100644 index 417184dba..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.3.1-4 +++ /dev/null @@ -1,4 +0,0 @@ --- 3.3 to 3.3.1 -ALTER TABLE domains ADD CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text))); -ALTER TABLE tsigkeys ADD CONSTRAINT c_lowercase_name check (((name)::text = lower((name)::text))); - diff --git a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.4.0 b/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.4.0 deleted file mode 100644 index 121bed5ec..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/3.4.0 +++ /dev/null @@ -1,35 +0,0 @@ --- 3.3.1 to 3.4 -ALTER TABLE records ADD disabled BOOL DEFAULT 'f'; -ALTER TABLE records ALTER COLUMN content TYPE VARCHAR(65535); -ALTER TABLE records ALTER COLUMN auth SET DEFAULT 't'; -ALTER TABLE records ALTER COLUMN type TYPE VARCHAR(10); -ALTER TABLE supermasters ALTER COLUMN ip TYPE INET USING ip::INET; -ALTER TABLE supermasters ALTER COLUMN account SET DEFAULT NOT NULL; -ALTER TABLE supermasters ADD CONSTRAINT supermasters_pkey PRIMARY KEY (ip, nameserver); -ALTER TABLE domainmetadata ALTER COLUMN kind TYPE VARCHAR(32); -ALTER TABLE tsigkeys ALTER COLUMN algorithm TYPE VARCHAR(50); - --- recordorder was already in our 3.3.1 upgrade scripts, so drop it if needed -DROP INDEX IF EXISTS recordorder; - -CREATE INDEX recordorder ON records (domain_id, ordername text_pattern_ops); -DROP INDEX IF EXISTS orderindex; - - -CREATE TABLE comments ( - id SERIAL PRIMARY KEY, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL, - CONSTRAINT domain_exists - FOREIGN KEY(domain_id) REFERENCES domains(id) - ON DELETE CASCADE, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE INDEX comments_domain_id_idx ON comments (domain_id); -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); diff --git a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/4.1.0-1 b/builder-support/debian/authoritative/debian-stretch/sql/pgsql/4.1.0-1 deleted file mode 100644 index 6c4f660a1..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/4.1.0-1 +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE records ALTER id TYPE BIGINT; diff --git a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/pgsql b/builder-support/debian/authoritative/debian-stretch/sql/pgsql/pgsql deleted file mode 100644 index b105d8795..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/pgsql/pgsql +++ /dev/null @@ -1,95 +0,0 @@ -CREATE TABLE domains ( - id SERIAL PRIMARY KEY, - name VARCHAR(255) NOT NULL, - master VARCHAR(128) DEFAULT NULL, - last_check INT DEFAULT NULL, - type VARCHAR(6) NOT NULL, - notified_serial INT DEFAULT NULL, - account VARCHAR(40) DEFAULT NULL, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE UNIQUE INDEX name_index ON domains(name); - - -CREATE TABLE records ( - id BIGSERIAL PRIMARY KEY, - domain_id INT DEFAULT NULL, - name VARCHAR(255) DEFAULT NULL, - type VARCHAR(10) DEFAULT NULL, - content VARCHAR(65535) DEFAULT NULL, - ttl INT DEFAULT NULL, - prio INT DEFAULT NULL, - change_date INT DEFAULT NULL, - disabled BOOL DEFAULT 'f', - ordername VARCHAR(255), - auth BOOL DEFAULT 't', - CONSTRAINT domain_exists - FOREIGN KEY(domain_id) REFERENCES domains(id) - ON DELETE CASCADE, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -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 INDEX recordorder ON records (domain_id, ordername text_pattern_ops); - - -CREATE TABLE supermasters ( - ip INET NOT NULL, - nameserver VARCHAR(255) NOT NULL, - account VARCHAR(40) NOT NULL, - PRIMARY KEY(ip, nameserver) -); - - -CREATE TABLE comments ( - id SERIAL PRIMARY KEY, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL, - CONSTRAINT domain_exists - FOREIGN KEY(domain_id) REFERENCES domains(id) - ON DELETE CASCADE, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE INDEX comments_domain_id_idx ON comments (domain_id); -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -CREATE TABLE domainmetadata ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - kind VARCHAR(32), - content TEXT -); - -CREATE INDEX domainidmetaindex ON domainmetadata(domain_id); - - -CREATE TABLE cryptokeys ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -CREATE INDEX domainidindex ON cryptokeys(domain_id); - - -CREATE TABLE tsigkeys ( - id SERIAL PRIMARY KEY, - name VARCHAR(255), - algorithm VARCHAR(50), - secret VARCHAR(255), - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); diff --git a/builder-support/debian/authoritative/debian-stretch/sql/sqlite3/3.0-1 b/builder-support/debian/authoritative/debian-stretch/sql/sqlite3/3.0-1 deleted file mode 100644 index 147133906..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/sqlite3/3.0-1 +++ /dev/null @@ -1,27 +0,0 @@ -alter table records add ordername VARCHAR(255); -alter table records add auth bool; -create index orderindex on records(ordername); - -create table domainmetadata ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(16) COLLATE NOCASE, - content TEXT -); - -create table cryptokeys ( - id INTEGER PRIMARY KEY, - domain_id INT DEFAULT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -create table tsigkeys ( - id INTEGER PRIMARY KEY, - name VARCHAR(255) COLLATE NOCASE, - algorithm VARCHAR(255) COLLATE NOCASE, - secret VARCHAR(255) -); - -create unique index namealgoindex on tsigkeys(name, algorithm); diff --git a/builder-support/debian/authoritative/debian-stretch/sql/sqlite3/3.4.0 b/builder-support/debian/authoritative/debian-stretch/sql/sqlite3/3.4.0 deleted file mode 100644 index 3d884905c..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/sqlite3/3.4.0 +++ /dev/null @@ -1,103 +0,0 @@ --- 3.x to 3.4 - -CREATE TABLE comments ( - id INTEGER PRIMARY KEY, - domain_id INTEGER NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL -); - -CREATE INDEX comments_domain_id_index ON comments (domain_id); -CREATE INDEX comments_nametype_index ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -BEGIN TRANSACTION; - CREATE TEMPORARY TABLE records_backup( - id INTEGER PRIMARY KEY, - domain_id INTEGER 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, - ordername VARCHAR(255), - auth BOOL DEFAULT 1 - ); - - INSERT INTO records_backup SELECT id,domain_id,name,type,content,ttl,prio,change_date,ordername,auth FROM records; - DROP TABLE records; - - CREATE TABLE records ( - id INTEGER PRIMARY KEY, - domain_id INTEGER 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, - disabled BOOLEAN DEFAULT 0, - ordername VARCHAR(255), - auth BOOL DEFAULT 1 - ); - - 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 INDEX orderindex ON records(ordername); - - INSERT INTO records SELECT id,domain_id,name,type,content,ttl,prio,change_date,0,ordername,auth FROM records_backup; - DROP TABLE records_backup; -COMMIT; - - -BEGIN TRANSACTION; - CREATE TEMPORARY TABLE supermasters_backup ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL COLLATE NOCASE, - account VARCHAR(40) DEFAULT NULL - ); - - INSERT INTO supermasters_backup SELECT ip,nameserver,account FROM supermasters; - UPDATE supermasters_backup SET account='' WHERE account IS NULL; - DROP TABLE supermasters; - - CREATE TABLE supermasters ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL COLLATE NOCASE, - account VARCHAR(40) NOT NULL - ); - CREATE UNIQUE INDEX ip_nameserver_pk ON supermasters(ip, nameserver); - - INSERT INTO supermasters SELECT ip,nameserver,account FROM supermasters_backup; - DROP TABLE supermasters_backup; -COMMIT; - - -BEGIN TRANSACTION; - CREATE TABLE domainmetadata_backup ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(32) COLLATE NOCASE, - content TEXT - ); - - INSERT INTO domainmetadata_backup SELECT id,domain_id,kind,content FROM domainmetadata; - DROP TABLE domainmetadata; - - CREATE TABLE domainmetadata ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(32) COLLATE NOCASE, - content TEXT - ); - CREATE INDEX domainmetaidindex ON domainmetadata(domain_id); - - INSERT INTO domainmetadata SELECT id,domain_id,kind,content FROM domainmetadata_backup; - DROP TABLE domainmetadata_backup; -COMMIT; diff --git a/builder-support/debian/authoritative/debian-stretch/sql/sqlite3/sqlite3 b/builder-support/debian/authoritative/debian-stretch/sql/sqlite3/sqlite3 deleted file mode 100644 index 7cdd2b878..000000000 --- a/builder-support/debian/authoritative/debian-stretch/sql/sqlite3/sqlite3 +++ /dev/null @@ -1,86 +0,0 @@ -CREATE TABLE domains ( - id INTEGER PRIMARY KEY, - name VARCHAR(255) NOT NULL COLLATE NOCASE, - master VARCHAR(128) DEFAULT NULL, - last_check INTEGER DEFAULT NULL, - type VARCHAR(6) NOT NULL, - notified_serial INTEGER DEFAULT NULL, - account VARCHAR(40) DEFAULT NULL -); - -CREATE UNIQUE INDEX name_index ON domains(name); - - -CREATE TABLE records ( - id INTEGER PRIMARY KEY, - domain_id INTEGER 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, - disabled BOOLEAN DEFAULT 0, - ordername VARCHAR(255), - auth BOOL DEFAULT 1 -); - -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 INDEX orderindex ON records(ordername); - - -CREATE TABLE supermasters ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL COLLATE NOCASE, - account VARCHAR(40) NOT NULL -); - -CREATE UNIQUE INDEX ip_nameserver_pk ON supermasters(ip, nameserver); - - -CREATE TABLE comments ( - id INTEGER PRIMARY KEY, - domain_id INTEGER NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL -); - -CREATE INDEX comments_domain_id_index ON comments (domain_id); -CREATE INDEX comments_nametype_index ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -CREATE TABLE domainmetadata ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(32) COLLATE NOCASE, - content TEXT -); - -CREATE INDEX domainmetaidindex ON domainmetadata(domain_id); - - -CREATE TABLE cryptokeys ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -CREATE INDEX domainidindex ON cryptokeys(domain_id); - - -CREATE TABLE tsigkeys ( - id INTEGER PRIMARY KEY, - name VARCHAR(255) COLLATE NOCASE, - algorithm VARCHAR(50) COLLATE NOCASE, - secret VARCHAR(255) -); - -CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.README.Debian b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.README.Debian deleted file mode 100644 index f7ecae432..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.README.Debian +++ /dev/null @@ -1,18 +0,0 @@ -Instructions on setting up MySQL as a backend for PowerDNS ----------------------------------------------------------- - -PowerDNS uses dbconfig-common. The database backends offer you to -automatically create and maintain the databases for you. If you choose -yes, you're fine, no more action needed. - -Should you decide to create your databases yourself, for example, if -you decide to use a non-standard schema, please find the database -schema recommended by Upstream for MySQL in -/usr/share/dbconfig-common/data/pdns-backend-mysql/install/mysql - -Just create a database (for example, named pdns) and then feed these -SQL commands to MySQL to get some defaults to start with: - - mysql -u root -p < /usr/share/dbconfig-common/data/pdns-backend-mysql/install/mysql - -Then add your data to the database. diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.config b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.config deleted file mode 100644 index 18ce7c2a8..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.config +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Install / upgrade database. - -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then - . /usr/share/dbconfig-common/dpkg/config.mysql - - # Default values - dbc_dbuser="pdns" - dbc_dbname="pdns" - dbc_first_version="3.0-1" - - dbc_go pdns-backend-mysql $@ -fi - -exit 0 - diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.install b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.install index 30e35c511..4b2b28a2b 100644 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.install +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.install @@ -1,4 +1,2 @@ debian/config/pdns.local.gmysql.conf usr/share/pdns-backend-mysql -debian/sql/mysql/*.* usr/share/dbconfig-common/data/pdns-backend-mysql/upgrade/mysql/ -debian/sql/mysql/mysql usr/share/dbconfig-common/data/pdns-backend-mysql/install/ usr/lib/*/pdns/libgmysqlbackend.so* diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.postinst b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.postinst index 59396e605..1efe63c9d 100644 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.postinst +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.postinst @@ -1,9 +1,6 @@ #!/bin/sh set -e -# Execute dbconfig-common -. /usr/share/debconf/confmodule - if [ -n "$PDNSDEBUG" ]; then echo "now debugging $0 $@" set -x @@ -50,15 +47,6 @@ if [ "$1" = "configure" ]; then fi fi - -. /usr/share/dbconfig-common/dpkg/postinst.mysql -dbc_first_version="3.0-1" -dbc_generate_include_args="-o template_infile=/usr/share/pdns-backend-mysql/pdns.local.gmysql.conf" -dbc_generate_include=template:/etc/powerdns/pdns.d/pdns.local.gmysql.conf -dbc_generate_include_owner=pdns -dbc_generate_include_perms=0640 -dbc_go $PKGNAME $@ - # Activate trigger dpkg-trigger pdns-server diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.postrm b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.postrm index 07e2e2dc8..bba61463a 100644 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.postrm +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.postrm @@ -8,15 +8,6 @@ fi PKGNAME="pdns-backend-mysql" -# Execute dbconfig-common -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then - . /usr/share/dbconfig-common/dpkg/postrm.mysql - dbc_go pdns-backend-mysql $@ -fi - if [ "$1" = "purge" ]; then # Remove files registered with ucf. if command -v ucfq >/dev/null; then diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.prerm b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.prerm deleted file mode 100644 index 283c36a64..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-mysql.prerm +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/prerm.mysql -dbc_go pdns-backend-mysql $@ - -#DEBHELPER# - -exit 0 diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.README.Debian b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.README.Debian deleted file mode 100644 index 335cfc135..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.README.Debian +++ /dev/null @@ -1,26 +0,0 @@ -Instructions on setting up PostgreSQL as a backend for PowerDNS ---------------------------------------------------------------- - -PowerDNS uses dbconfig-common. The database backends offer you to -automatically create and maintain the databases for you. If you choose -yes, you're fine, no more action needed. - -Should you decide to create your databases yourself, for example, if -you decide to use a non-standard schema, please find the database -schema recommended by Upstream for PostgreSQL in -/usr/share/dbconfig-common/data/pdns-backend-pgsql/install/pgsql - -Just create a database using 'createdb' (for example named pdns) and -then feed these SQL commands to PostgreSQL to get some defaults to -start with: - - psql -h -U -f /usr/share/dbconfig-common/data/pdns-backend-pgsql/install/pgsql - -Then add your data to the database. - -*** SSL WARNING *** -Please note that SSL connections to a PostgreSQL database currently do not -work when PowerDNS is run chrooted because PowerDNS cannot access the -libssl library from within the chroot. -*** SSL WARNING *** - diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.config b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.config deleted file mode 100644 index 2c1d00b32..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.config +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Install / upgrade database. - -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/config.pgsql - - # Default values - dbc_dbuser="pdns" - dbc_dbname="pdns" - dbc_first_version="3.0-1" - - dbc_go pdns-backend-pgsql $@ -fi - -exit 0 - diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.install b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.install index 9ea5a52a2..85e3561b7 100644 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.install +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.install @@ -1,4 +1,2 @@ debian/config/pdns.local.gpgsql.conf usr/share/pdns-backend-pgsql -debian/sql/pgsql/*.* usr/share/dbconfig-common/data/pdns-backend-pgsql/upgrade/pgsql/ -debian/sql/pgsql/pgsql usr/share/dbconfig-common/data/pdns-backend-pgsql/install/ usr/lib/*/pdns/libgpgsqlbackend.so* diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.postinst b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.postinst index 243027560..d4944afca 100644 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.postinst +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.postinst @@ -1,9 +1,6 @@ #!/bin/sh set -e -# Execute dbconfig-common -. /usr/share/debconf/confmodule - if [ -n "$PDNSDEBUG" ]; then echo "now debugging $0 $@" set -x @@ -46,15 +43,6 @@ if [ "$1" = "configure" ]; then fi fi -. /usr/share/dbconfig-common/dpkg/postinst.pgsql -dbc_first_version="3.0-1" -dbc_pgsql_createdb_encoding="UTF8" -dbc_generate_include_args="-o template_infile=/usr/share/pdns-backend-pgsql/pdns.local.gpgsql.conf" -dbc_generate_include=template:/etc/powerdns/pdns.d/pdns.local.gpgsql.conf -dbc_generate_include_owner=pdns -dbc_generate_include_perms=0640 -dbc_go $PKGNAME $@ - # Activate trigger dpkg-trigger pdns-server diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.postrm b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.postrm index 8a1e11e04..26a90e61a 100644 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.postrm +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.postrm @@ -8,15 +8,6 @@ fi PKGNAME="pdns-backend-pgsql" -# Execute dbconfig-common -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/postrm.pgsql - dbc_go pdns-backend-pgsql $@ -fi - if [ "$1" = "purge" ]; then # Remove files registered with ucf. UCF="ucf" diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.prerm b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.prerm deleted file mode 100644 index a350d8ec7..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-pgsql.prerm +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/prerm.pgsql -dbc_go pdns-backend-pgsql $@ - -#DEBHELPER# - -exit 0 diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.config b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.config deleted file mode 100644 index c34e84caa..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.config +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Install / upgrade database. - -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -if [ -f /usr/share/dbconfig-common/dpkg/config.sqlite3 ]; then - . /usr/share/dbconfig-common/dpkg/config.sqlite3 - - # Default values - dbc_basepath=/var/lib/powerdns - dbc_dbname="pdns.sqlite3" - dbc_first_version="3.0-1" - - dbc_go pdns-backend-sqlite3 $@ -fi - -exit 0 - diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.install b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.install index 37e8cff2c..6a0032b13 100644 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.install +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.install @@ -1,4 +1,2 @@ debian/config/pdns.local.gsqlite3.conf usr/share/pdns-backend-sqlite3 -debian/sql/sqlite3/*.* usr/share/dbconfig-common/data/pdns-backend-sqlite3/upgrade/sqlite3/ -debian/sql/sqlite3/sqlite3 usr/share/dbconfig-common/data/pdns-backend-sqlite3/install/ usr/lib/*/pdns/libgsqlite3backend.so* diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.postinst b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.postinst index b95cabbb0..0e137377d 100644 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.postinst +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.postinst @@ -4,9 +4,6 @@ set -e -# Execute dbconfig-common -. /usr/share/debconf/confmodule - if [ -n "$PDNSDEBUG" ]; then echo "now debugging $0 $@" set -x @@ -49,16 +46,6 @@ if [ "$1" = "configure" ]; then fi fi -. /usr/share/dbconfig-common/dpkg/postinst.sqlite3 -dbc_first_version="3.0-1" -dbc_generate_include_args="-o template_infile=/usr/share/pdns-backend-sqlite3/pdns.local.gsqlite3.conf" -dbc_generate_include=template:/etc/powerdns/pdns.d/pdns.local.gsqlite3.conf -dbc_generate_include_owner=pdns -dbc_generate_include_perms=0640 -dbc_dbfile_owner=pdns:pdns -dbc_dbfile_perms=0640 -dbc_go pdns-backend-sqlite3 $@ - ucfr $PKGNAME /etc/powerdns/pdns.d/pdns.local.gsqlite3.conf dpkg-trigger pdns-server diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.postrm b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.postrm index 47f0934ee..7fca5c191 100644 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.postrm +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.postrm @@ -8,15 +8,6 @@ fi PKGNAME="pdns-backend-sqlite3" -# Execute dbconfig-common -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -if [ -f /usr/share/dbconfig-common/dpkg/postrm.sqlite3 ]; then - . /usr/share/dbconfig-common/dpkg/postrm.sqlite3 - dbc_go pdns-backend-sqlite3 $@ -fi - if [ "$1" = "purge" ]; then # Remove files registered with ucf. if command -v ucfq >/dev/null; then diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.prerm b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.prerm deleted file mode 100644 index bf71ca243..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-sqlite3.prerm +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e - -# Execute dbconfig-common -. /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/prerm.sqlite3 -dbc_go pdns-backend-sqlite3 $@ - -#DEBHELPER# - -exit 0 diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/3.0-1 b/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/3.0-1 deleted file mode 100644 index 696d495d3..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/3.0-1 +++ /dev/null @@ -1,32 +0,0 @@ -create table domainmetadata ( - id INT auto_increment, - domain_id INT NOT NULL, - kind VARCHAR(16), - content TEXT, - primary key(id) -); - -create table cryptokeys ( - id INT auto_increment, - domain_id INT NOT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT, - primary key(id) -); - -alter table records add ordername VARCHAR(255); -alter table records add auth bool; -create index orderindex on records(ordername); - -create table tsigkeys ( - id INT auto_increment, - name VARCHAR(255), - algorithm VARCHAR(255), - secret VARCHAR(255), - primary key(id) -); - -create unique index namealgoindex on tsigkeys(name, algorithm); - -alter table records change column type type VARCHAR(10); diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/3.3.1-4 b/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/3.3.1-4 deleted file mode 100644 index 197062365..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/3.3.1-4 +++ /dev/null @@ -1,17 +0,0 @@ --- 3.0 to 3.1 - -ALTER TABLE records MODIFY content VARCHAR(64000); -ALTER TABLE tsigkeys MODIFY algorithm VARCHAR(50); - --- 3.1 to 3.2 -ALTER TABLE records MODIFY ordername VARCHAR(255) BINARY; -DROP INDEX orderindex ON records; -CREATE INDEX recordorder ON records (domain_id, ordername); - --- 3.2 to 3.3 -ALTER TABLE supermasters MODIFY ip VARCHAR(64); -DROP INDEX rec_name_index ON records; - --- 3.3 to 3.3.1 --- None for MySQL - diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/3.4.0 b/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/3.4.0 deleted file mode 100644 index a97f5762f..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/3.4.0 +++ /dev/null @@ -1,31 +0,0 @@ --- 3.3.1 dnssec to 3.4 -ALTER TABLE records ADD disabled TINYINT(1) DEFAULT 0 AFTER change_date; -ALTER TABLE records MODIFY content VARCHAR(64000) DEFAULT NULL; -ALTER TABLE records MODIFY ordername VARCHAR(255) BINARY DEFAULT NULL; -ALTER TABLE records MODIFY auth TINYINT(1) DEFAULT 1; -ALTER TABLE records MODIFY type VARCHAR(10); -ALTER TABLE supermasters MODIFY ip VARCHAR(64) NOT NULL; -ALTER TABLE supermasters ADD PRIMARY KEY(ip, nameserver); -ALTER TABLE supermasters MODIFY account VARCHAR(40) NOT NULL; -ALTER TABLE domainmetadata MODIFY kind VARCHAR(32); -ALTER TABLE tsigkeys MODIFY algorithm VARCHAR(50); -ALTER TABLE domainmetadata ENGINE=InnoDB; -ALTER TABLE cryptokeys ENGINE=InnoDB; -ALTER TABLE tsigkeys ENGINE=InnoDB; - -CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind); - -CREATE TABLE comments ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) NOT NULL, - comment VARCHAR(64000) NOT NULL, - PRIMARY KEY(id) -) Engine=InnoDB; - -CREATE INDEX comments_domain_id_idx ON comments (domain_id); -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/4.0.1-6 b/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/4.0.1-6 deleted file mode 100644 index d6140a302..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/4.0.1-6 +++ /dev/null @@ -1,21 +0,0 @@ --- MariaDB default index size and default character set causes the --- name indexes to fail to create. Therefore we are overriding the --- character set to something smaller than the insane utf8mb4 def. - -ALTER TABLE domains CONVERT TO CHARACTER SET 'latin1'; -ALTER TABLE domains MODIFY account VARCHAR(40) CHARACTER SET 'utf8' DEFAULT NULL; - -ALTER TABLE records CONVERT TO CHARACTER SET 'latin1'; - -ALTER TABLE supermasters CONVERT TO CHARACTER SET 'latin1'; -ALTER TABLE supermasters MODIFY account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL; - -ALTER TABLE comments CONVERT TO CHARACTER SET 'latin1'; -ALTER TABLE comments MODIFY account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL; -ALTER TABLE comments MODIFY comment TEXT CHARACTER SET 'utf8' NOT NULL; - -ALTER TABLE domainmetadata CONVERT TO CHARACTER SET 'latin1'; - -ALTER TABLE cryptokeys CONVERT TO CHARACTER SET 'latin1'; - -ALTER TABLE tsigkeys CONVERT TO CHARACTER SET 'latin1'; diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/4.0.3-1 b/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/4.0.3-1 deleted file mode 100644 index c63c75348..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/4.0.3-1 +++ /dev/null @@ -1,3 +0,0 @@ --- Use TEXT in place of VARCHAR(64000) for compatibility with mysql 5.6 and mariadb. --- pdns 4.0.1, 4.0.2 got this wrong. -ALTER TABLE comments MODIFY comment TEXT CHARACTER SET 'utf8' NOT NULL; diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/4.1.0-1 b/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/4.1.0-1 deleted file mode 100644 index acd9ce3cc..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/4.1.0-1 +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE records MODIFY id BIGINT AUTO_INCREMENT; -CREATE INDEX ordername ON records (ordername); -DROP INDEX recordorder ON records; - -DROP INDEX comments_domain_id_idx ON comments; diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/mysql b/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/mysql deleted file mode 100644 index 455de0b1d..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/mysql/mysql +++ /dev/null @@ -1,93 +0,0 @@ --- MariaDB default index size and default character set causes the --- name indexes to fail to create. Therefore we are overriding the --- character set to something smaller than the insane utf8mb4 def. - -CREATE TABLE domains ( - id INT AUTO_INCREMENT, - name VARCHAR(255) NOT NULL, - master VARCHAR(128) DEFAULT NULL, - last_check INT DEFAULT NULL, - type VARCHAR(6) NOT NULL, - notified_serial INT DEFAULT NULL, - account VARCHAR(40) CHARACTER SET 'utf8' DEFAULT NULL, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE UNIQUE INDEX name_index ON domains(name); - - -CREATE TABLE records ( - id BIGINT AUTO_INCREMENT, - domain_id INT DEFAULT NULL, - name VARCHAR(255) DEFAULT NULL, - type VARCHAR(10) DEFAULT NULL, - content VARCHAR(64000) DEFAULT NULL, - ttl INT DEFAULT NULL, - prio INT DEFAULT NULL, - change_date INT DEFAULT NULL, - disabled TINYINT(1) DEFAULT 0, - ordername VARCHAR(255) BINARY DEFAULT NULL, - auth TINYINT(1) DEFAULT 1, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX nametype_index ON records(name,type); -CREATE INDEX domain_id ON records(domain_id); -CREATE INDEX ordername ON records (ordername); - - -CREATE TABLE supermasters ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL, - account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL, - PRIMARY KEY (ip, nameserver) -) Engine=InnoDB CHARACTER SET 'latin1'; - - -CREATE TABLE comments ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) CHARACTER SET 'utf8' NOT NULL, - comment TEXT CHARACTER SET 'utf8' NOT NULL, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -CREATE TABLE domainmetadata ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - kind VARCHAR(32), - content TEXT, - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind); - - -CREATE TABLE cryptokeys ( - id INT AUTO_INCREMENT, - domain_id INT NOT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT, - PRIMARY KEY(id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE INDEX domainidindex ON cryptokeys(domain_id); - - -CREATE TABLE tsigkeys ( - id INT AUTO_INCREMENT, - name VARCHAR(255), - algorithm VARCHAR(50), - secret VARCHAR(255), - PRIMARY KEY (id) -) Engine=InnoDB CHARACTER SET 'latin1'; - -CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.0-1 b/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.0-1 deleted file mode 100644 index a508e7aae..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.0-1 +++ /dev/null @@ -1,29 +0,0 @@ -alter table records add ordername VARCHAR(255); -alter table records add auth bool; -create index orderindex on records(ordername); - -create table domainmetadata ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - kind VARCHAR(16), - content TEXT -); - -create table cryptokeys ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -create table tsigkeys ( - id SERIAL PRIMARY KEY, - name VARCHAR(255), - algorithm VARCHAR(255), - secret VARCHAR(255) -); - -create unique index namealgoindex on tsigkeys(name, algorithm); - -alter table records alter column type type VARCHAR(10); diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.3-1 b/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.3-1 deleted file mode 100644 index d5be011c3..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.3-1 +++ /dev/null @@ -1,26 +0,0 @@ --- Change master VARCHAR(20) -> VARCHAR(255) -ALTER TABLE domains ALTER COLUMN master TYPE VARCHAR(255); - --- Change content VARCHAR(255) -> VARCHAR(65535) -ALTER TABLE records ALTER COLUMN content TYPE VARCHAR(65535); - --- Lowercase the name column and add a lowercase constraint check -UPDATE records SET name=lower(name); -ALTER TABLE records ADD CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text))); - --- Change ip VARCHAR(25) -> VARCHAR(64) -ALTER TABLE supermasters ALTER COLUMN ip TYPE VARCHAR(64); - --- Recreate index -DROP INDEX IF EXISTS orderindex; -CREATE INDEX recordorder ON records (domain_id, ordername text_pattern_ops); - --- Create an index on domainmetadata -CREATE INDEX domainidmetaindex ON domainmetadata(domain_id); - --- Create an index on cryptokeys -CREATE INDEX domainidindex ON cryptokeys(domain_id); - --- Change algorithm VARCHAR(255) -> VARCHAR(50) -ALTER TABLE tsigkeys ALTER COLUMN algorithm TYPE VARCHAR(50); - diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.3.1-4 b/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.3.1-4 deleted file mode 100644 index 417184dba..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.3.1-4 +++ /dev/null @@ -1,4 +0,0 @@ --- 3.3 to 3.3.1 -ALTER TABLE domains ADD CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text))); -ALTER TABLE tsigkeys ADD CONSTRAINT c_lowercase_name check (((name)::text = lower((name)::text))); - diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.4.0 b/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.4.0 deleted file mode 100644 index 121bed5ec..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/3.4.0 +++ /dev/null @@ -1,35 +0,0 @@ --- 3.3.1 to 3.4 -ALTER TABLE records ADD disabled BOOL DEFAULT 'f'; -ALTER TABLE records ALTER COLUMN content TYPE VARCHAR(65535); -ALTER TABLE records ALTER COLUMN auth SET DEFAULT 't'; -ALTER TABLE records ALTER COLUMN type TYPE VARCHAR(10); -ALTER TABLE supermasters ALTER COLUMN ip TYPE INET USING ip::INET; -ALTER TABLE supermasters ALTER COLUMN account SET DEFAULT NOT NULL; -ALTER TABLE supermasters ADD CONSTRAINT supermasters_pkey PRIMARY KEY (ip, nameserver); -ALTER TABLE domainmetadata ALTER COLUMN kind TYPE VARCHAR(32); -ALTER TABLE tsigkeys ALTER COLUMN algorithm TYPE VARCHAR(50); - --- recordorder was already in our 3.3.1 upgrade scripts, so drop it if needed -DROP INDEX IF EXISTS recordorder; - -CREATE INDEX recordorder ON records (domain_id, ordername text_pattern_ops); -DROP INDEX IF EXISTS orderindex; - - -CREATE TABLE comments ( - id SERIAL PRIMARY KEY, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL, - CONSTRAINT domain_exists - FOREIGN KEY(domain_id) REFERENCES domains(id) - ON DELETE CASCADE, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE INDEX comments_domain_id_idx ON comments (domain_id); -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/4.1.0-1 b/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/4.1.0-1 deleted file mode 100644 index 6c4f660a1..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/4.1.0-1 +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE records ALTER id TYPE BIGINT; diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/pgsql b/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/pgsql deleted file mode 100644 index b105d8795..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/pgsql/pgsql +++ /dev/null @@ -1,95 +0,0 @@ -CREATE TABLE domains ( - id SERIAL PRIMARY KEY, - name VARCHAR(255) NOT NULL, - master VARCHAR(128) DEFAULT NULL, - last_check INT DEFAULT NULL, - type VARCHAR(6) NOT NULL, - notified_serial INT DEFAULT NULL, - account VARCHAR(40) DEFAULT NULL, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE UNIQUE INDEX name_index ON domains(name); - - -CREATE TABLE records ( - id BIGSERIAL PRIMARY KEY, - domain_id INT DEFAULT NULL, - name VARCHAR(255) DEFAULT NULL, - type VARCHAR(10) DEFAULT NULL, - content VARCHAR(65535) DEFAULT NULL, - ttl INT DEFAULT NULL, - prio INT DEFAULT NULL, - change_date INT DEFAULT NULL, - disabled BOOL DEFAULT 'f', - ordername VARCHAR(255), - auth BOOL DEFAULT 't', - CONSTRAINT domain_exists - FOREIGN KEY(domain_id) REFERENCES domains(id) - ON DELETE CASCADE, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -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 INDEX recordorder ON records (domain_id, ordername text_pattern_ops); - - -CREATE TABLE supermasters ( - ip INET NOT NULL, - nameserver VARCHAR(255) NOT NULL, - account VARCHAR(40) NOT NULL, - PRIMARY KEY(ip, nameserver) -); - - -CREATE TABLE comments ( - id SERIAL PRIMARY KEY, - domain_id INT NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL, - CONSTRAINT domain_exists - FOREIGN KEY(domain_id) REFERENCES domains(id) - ON DELETE CASCADE, - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE INDEX comments_domain_id_idx ON comments (domain_id); -CREATE INDEX comments_name_type_idx ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -CREATE TABLE domainmetadata ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - kind VARCHAR(32), - content TEXT -); - -CREATE INDEX domainidmetaindex ON domainmetadata(domain_id); - - -CREATE TABLE cryptokeys ( - id SERIAL PRIMARY KEY, - domain_id INT REFERENCES domains(id) ON DELETE CASCADE, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -CREATE INDEX domainidindex ON cryptokeys(domain_id); - - -CREATE TABLE tsigkeys ( - id SERIAL PRIMARY KEY, - name VARCHAR(255), - algorithm VARCHAR(50), - secret VARCHAR(255), - CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) -); - -CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/sqlite3/3.0-1 b/builder-support/debian/authoritative/ubuntu-trusty/sql/sqlite3/3.0-1 deleted file mode 100644 index 147133906..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/sqlite3/3.0-1 +++ /dev/null @@ -1,27 +0,0 @@ -alter table records add ordername VARCHAR(255); -alter table records add auth bool; -create index orderindex on records(ordername); - -create table domainmetadata ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(16) COLLATE NOCASE, - content TEXT -); - -create table cryptokeys ( - id INTEGER PRIMARY KEY, - domain_id INT DEFAULT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -create table tsigkeys ( - id INTEGER PRIMARY KEY, - name VARCHAR(255) COLLATE NOCASE, - algorithm VARCHAR(255) COLLATE NOCASE, - secret VARCHAR(255) -); - -create unique index namealgoindex on tsigkeys(name, algorithm); diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/sqlite3/3.4.0 b/builder-support/debian/authoritative/ubuntu-trusty/sql/sqlite3/3.4.0 deleted file mode 100644 index 3d884905c..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/sqlite3/3.4.0 +++ /dev/null @@ -1,103 +0,0 @@ --- 3.x to 3.4 - -CREATE TABLE comments ( - id INTEGER PRIMARY KEY, - domain_id INTEGER NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL -); - -CREATE INDEX comments_domain_id_index ON comments (domain_id); -CREATE INDEX comments_nametype_index ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -BEGIN TRANSACTION; - CREATE TEMPORARY TABLE records_backup( - id INTEGER PRIMARY KEY, - domain_id INTEGER 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, - ordername VARCHAR(255), - auth BOOL DEFAULT 1 - ); - - INSERT INTO records_backup SELECT id,domain_id,name,type,content,ttl,prio,change_date,ordername,auth FROM records; - DROP TABLE records; - - CREATE TABLE records ( - id INTEGER PRIMARY KEY, - domain_id INTEGER 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, - disabled BOOLEAN DEFAULT 0, - ordername VARCHAR(255), - auth BOOL DEFAULT 1 - ); - - 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 INDEX orderindex ON records(ordername); - - INSERT INTO records SELECT id,domain_id,name,type,content,ttl,prio,change_date,0,ordername,auth FROM records_backup; - DROP TABLE records_backup; -COMMIT; - - -BEGIN TRANSACTION; - CREATE TEMPORARY TABLE supermasters_backup ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL COLLATE NOCASE, - account VARCHAR(40) DEFAULT NULL - ); - - INSERT INTO supermasters_backup SELECT ip,nameserver,account FROM supermasters; - UPDATE supermasters_backup SET account='' WHERE account IS NULL; - DROP TABLE supermasters; - - CREATE TABLE supermasters ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL COLLATE NOCASE, - account VARCHAR(40) NOT NULL - ); - CREATE UNIQUE INDEX ip_nameserver_pk ON supermasters(ip, nameserver); - - INSERT INTO supermasters SELECT ip,nameserver,account FROM supermasters_backup; - DROP TABLE supermasters_backup; -COMMIT; - - -BEGIN TRANSACTION; - CREATE TABLE domainmetadata_backup ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(32) COLLATE NOCASE, - content TEXT - ); - - INSERT INTO domainmetadata_backup SELECT id,domain_id,kind,content FROM domainmetadata; - DROP TABLE domainmetadata; - - CREATE TABLE domainmetadata ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(32) COLLATE NOCASE, - content TEXT - ); - CREATE INDEX domainmetaidindex ON domainmetadata(domain_id); - - INSERT INTO domainmetadata SELECT id,domain_id,kind,content FROM domainmetadata_backup; - DROP TABLE domainmetadata_backup; -COMMIT; diff --git a/builder-support/debian/authoritative/ubuntu-trusty/sql/sqlite3/sqlite3 b/builder-support/debian/authoritative/ubuntu-trusty/sql/sqlite3/sqlite3 deleted file mode 100644 index 7cdd2b878..000000000 --- a/builder-support/debian/authoritative/ubuntu-trusty/sql/sqlite3/sqlite3 +++ /dev/null @@ -1,86 +0,0 @@ -CREATE TABLE domains ( - id INTEGER PRIMARY KEY, - name VARCHAR(255) NOT NULL COLLATE NOCASE, - master VARCHAR(128) DEFAULT NULL, - last_check INTEGER DEFAULT NULL, - type VARCHAR(6) NOT NULL, - notified_serial INTEGER DEFAULT NULL, - account VARCHAR(40) DEFAULT NULL -); - -CREATE UNIQUE INDEX name_index ON domains(name); - - -CREATE TABLE records ( - id INTEGER PRIMARY KEY, - domain_id INTEGER 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, - disabled BOOLEAN DEFAULT 0, - ordername VARCHAR(255), - auth BOOL DEFAULT 1 -); - -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 INDEX orderindex ON records(ordername); - - -CREATE TABLE supermasters ( - ip VARCHAR(64) NOT NULL, - nameserver VARCHAR(255) NOT NULL COLLATE NOCASE, - account VARCHAR(40) NOT NULL -); - -CREATE UNIQUE INDEX ip_nameserver_pk ON supermasters(ip, nameserver); - - -CREATE TABLE comments ( - id INTEGER PRIMARY KEY, - domain_id INTEGER NOT NULL, - name VARCHAR(255) NOT NULL, - type VARCHAR(10) NOT NULL, - modified_at INT NOT NULL, - account VARCHAR(40) DEFAULT NULL, - comment VARCHAR(65535) NOT NULL -); - -CREATE INDEX comments_domain_id_index ON comments (domain_id); -CREATE INDEX comments_nametype_index ON comments (name, type); -CREATE INDEX comments_order_idx ON comments (domain_id, modified_at); - - -CREATE TABLE domainmetadata ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - kind VARCHAR(32) COLLATE NOCASE, - content TEXT -); - -CREATE INDEX domainmetaidindex ON domainmetadata(domain_id); - - -CREATE TABLE cryptokeys ( - id INTEGER PRIMARY KEY, - domain_id INT NOT NULL, - flags INT NOT NULL, - active BOOL, - content TEXT -); - -CREATE INDEX domainidindex ON cryptokeys(domain_id); - - -CREATE TABLE tsigkeys ( - id INTEGER PRIMARY KEY, - name VARCHAR(255) COLLATE NOCASE, - algorithm VARCHAR(50) COLLATE NOCASE, - secret VARCHAR(255) -); - -CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm);