[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 04/12] [db] Ensure names for all PRIMARY KEY constraints end with _pkey



Most PRIMARY KEY constraints were ending in _pkey already, but some of them
(most of those consisting of a single column) were ending in _name. Changed
them so that the naming scheme is consistent for all.
---
 db/db.sql |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/db/db.sql b/db/db.sql
index 13acb32..2380145 100644
--- a/db/db.sql
+++ b/db/db.sql
@@ -27,7 +27,7 @@ CREATE LANGUAGE plpgsql;
 
 CREATE TABLE architectures (
 	name text
-	  CONSTRAINT arch_name PRIMARY KEY
+	  CONSTRAINT arch_pkey PRIMARY KEY
 );
 
 COMMENT ON TABLE architectures IS 'Valid architectures';
@@ -51,7 +51,7 @@ INSERT INTO architectures (name) VALUES ('sparc');
 
 CREATE TABLE suites (
 	name text
-	  CONSTRAINT suite_name PRIMARY KEY,
+	  CONSTRAINT suite_pkey PRIMARY KEY,
 	priority integer,
 	depwait boolean
 	  DEFAULT 't',
@@ -76,7 +76,7 @@ INSERT INTO suites (name, priority, depwait, hidden)
 
 CREATE TABLE components (
 	name text
-	  CONSTRAINT component_name PRIMARY KEY
+	  CONSTRAINT component_pkey PRIMARY KEY
 );
 
 COMMENT ON TABLE components IS 'Valid archive components';
@@ -88,7 +88,7 @@ INSERT INTO components (name) VALUES ('non-free');
 
 CREATE TABLE package_priorities (
 	name text
-	  CONSTRAINT pkg_pri_name PRIMARY KEY
+	  CONSTRAINT pkg_pri_pkey PRIMARY KEY
 );
 
 COMMENT ON TABLE package_priorities IS 'Valid package priorities';
@@ -102,7 +102,7 @@ INSERT INTO package_priorities (name) VALUES ('extra');
 
 CREATE TABLE package_sections (
         name text
-          CONSTRAINT pkg_sect_name PRIMARY KEY
+          CONSTRAINT pkg_sect_pkey PRIMARY KEY
 );
 
 COMMENT ON TABLE package_sections IS 'Valid package sections';
@@ -243,7 +243,7 @@ COMMENT ON COLUMN binaries.pkg_priority_name IS 'Package priority';
 
 CREATE TABLE job_states (
 	name text
-	  CONSTRAINT state_name PRIMARY KEY
+	  CONSTRAINT state_pkey PRIMARY KEY
 );
 
 COMMENT ON TABLE job_states IS 'Build job states';
-- 
1.6.1.1.352.g2c729


Reply to: