[PATCH 2/2] [setup] init_pool.sql imports and uses debversion type
Source and binary package version numbers are stored as the debversion
type instead of TEXT, allowing sorting in strict version (as opposed to
lexical) order.
Signed-off-by: Roger Leigh <rleigh@debian.org>
---
setup/init_pool.sql | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/setup/init_pool.sql b/setup/init_pool.sql
index 1e36394..be77ea0 100644
--- a/setup/init_pool.sql
+++ b/setup/init_pool.sql
@@ -3,6 +3,8 @@ CREATE DATABASE projectb WITH ENCODING = 'SQL_ASCII';
\c projectb
+\i version.sql
+
CREATE TABLE archive (
id SERIAL PRIMARY KEY,
name TEXT UNIQUE NOT NULL,
@@ -78,7 +80,7 @@ CREATE TABLE files (
CREATE TABLE source (
id SERIAL PRIMARY KEY,
source TEXT NOT NULL,
- version TEXT NOT NULL,
+ version DEBVERSION NOT NULL,
maintainer INT4 NOT NULL, -- REFERENCES maintainer
changedby INT4 NOT NULL, -- REFERENCES maintainer
file INT4 UNIQUE NOT NULL, -- REFERENCES files
@@ -103,7 +105,7 @@ CREATE TABLE dsc_files (
CREATE TABLE binaries (
id SERIAL PRIMARY KEY,
package TEXT NOT NULL,
- version TEXT NOT NULL,
+ version DEBVERSION NOT NULL,
maintainer INT4 NOT NULL, -- REFERENCES maintainer
source INT4, -- REFERENCES source,
architecture INT4 NOT NULL, -- REFERENCES architecture
--
1.5.6.5
Reply to: