From 26a7ad4c2da979419aaa4604139ad93ce0601c88 Mon Sep 17 00:00:00 2001 From: Graham Hayes Date: Mon, 12 Dec 2016 16:01:49 +0000 Subject: [PATCH] Remove lowercase constarint for pgsql Change-Id: Ifcb43803be2ad836a87cb925fa8910e8fd9ea8cf --- .../designate_plugins/backend-pdns4-pgsql-db.sql | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/devstack/designate_plugins/backend-pdns4-pgsql-db.sql b/devstack/designate_plugins/backend-pdns4-pgsql-db.sql index e14395b3d..6856b3e56 100644 --- a/devstack/designate_plugins/backend-pdns4-pgsql-db.sql +++ b/devstack/designate_plugins/backend-pdns4-pgsql-db.sql @@ -5,8 +5,7 @@ CREATE TABLE domains ( 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))) + account VARCHAR(40) DEFAULT NULL ); CREATE UNIQUE INDEX name_index ON domains(name); @@ -26,8 +25,7 @@ CREATE TABLE records ( 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))) + ON DELETE CASCADE ); CREATE INDEX rec_name_index ON records(name); @@ -54,8 +52,7 @@ CREATE TABLE comments ( 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))) + ON DELETE CASCADE ); CREATE INDEX comments_domain_id_idx ON comments (domain_id); @@ -88,8 +85,7 @@ 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))) + secret VARCHAR(255) ); CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm);