aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-12-31 13:41:20 +0000
committerRalph Amissah <ralph@amissah.com>2007-12-31 13:41:20 +0000
commit1dd09c8731bdef87885260a77091e5e0e9918bfe (patch)
tree7303821fbbe74ad56b20f2f44295e4561be62e22
parentsisu-0.63.0 + md5s (diff)
change primary key indexes to bigint (requested)
-rw-r--r--lib/sisu/v0/db_create.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/sisu/v0/db_create.rb b/lib/sisu/v0/db_create.rb
index 68d0ae3d..ac8f78bf 100644
--- a/lib/sisu/v0/db_create.rb
+++ b/lib/sisu/v0/db_create.rb
@@ -7,14 +7,14 @@
* Author: Ralph Amissah
* Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Ralph Amissah All Rights Reserved.
+ 2007, 2008 Ralph Amissah All Rights Reserved.
* License: GPL 3 or later:
SiSU, a framework for document structuring, publishing and search
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Ralph Amissah
+ 2007, 2008 Ralph Amissah
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
@@ -98,7 +98,7 @@ module SiSU_DB_create
} unless @opt.cmd =~/q/
@conn.execute(%{
CREATE TABLE metadata (
- tid INT4 PRIMARY KEY,
+ tid BIGINT PRIMARY KEY,
title VARCHAR(#{lt_title}) NULL,
subtitle VARCHAR(#{lt_subtitle}) NULL,
creator VARCHAR(#{lt_creator}) NULL,
@@ -163,8 +163,8 @@ module SiSU_DB_create
} unless @opt.cmd =~/q/
@conn.execute(%{
CREATE TABLE documents (
- lid INT4 PRIMARY KEY,
- metadata_tid INT4 REFERENCES metadata,
+ lid BIGINT PRIMARY KEY,
+ metadata_tid BIGINT REFERENCES metadata,
ocn SMALLINT,
ocnd VARCHAR(6),
ocns VARCHAR(6),
@@ -193,14 +193,14 @@ module SiSU_DB_create
end
def endnotes
print %{
- to be populated from documents files
+ to be populated from document files
create tables endnotes
data import through ruby transfer
} unless @opt.cmd =~/q/
@conn.execute(%{
CREATE TABLE endnotes (
- nid INT4 PRIMARY KEY,
- document_lid INT4 REFERENCES documents,
+ nid BIGINT PRIMARY KEY,
+ document_lid BIGINT REFERENCES documents,
nr SMALLINT,
clean TEXT NULL,
body TEXT NULL,
@@ -208,21 +208,21 @@ module SiSU_DB_create
ocnd VARCHAR(6),
ocns VARCHAR(6),
digest_clean CHAR(#{@@dl}),
- metadata_tid INT4 REFERENCES metadata
+ metadata_tid BIGINT REFERENCES metadata
);
#{@comment.endnotes}
})
end
def endnotes_asterisk
print %{
- to be populated from documents files
+ to be populated from document files
create tables endnotes_asterisk
data import through ruby transfer
} unless @opt.cmd =~/q/
@conn.execute(%{
CREATE TABLE endnotes_asterisk (
- nid INT4 PRIMARY KEY,
- document_lid INT4 REFERENCES documents,
+ nid BIGINT PRIMARY KEY,
+ document_lid BIGINT REFERENCES documents,
nr SMALLINT,
clean TEXT NULL,
body TEXT NULL,
@@ -230,21 +230,21 @@ module SiSU_DB_create
ocnd VARCHAR(6),
ocns VARCHAR(6),
digest_clean CHAR(#{@@dl}),
- metadata_tid INT4 REFERENCES metadata
+ metadata_tid BIGINT REFERENCES metadata
);
#{@comment.endnotes_asterisk}
})
end
def endnotes_plus
print %{
- to be populated from documents files
+ to be populated from document files
create tables endnotes_plus
data import through ruby transfer
} unless @opt.cmd =~/q/
@conn.execute(%{
CREATE TABLE endnotes_plus (
- nid INT4 PRIMARY KEY,
- document_lid INT4 REFERENCES documents,
+ nid BIGINT PRIMARY KEY,
+ document_lid BIGINT REFERENCES documents,
nr SMALLINT,
clean TEXT NULL,
body TEXT NULL,
@@ -252,7 +252,7 @@ module SiSU_DB_create
ocnd VARCHAR(6),
ocns VARCHAR(6),
digest_clean CHAR(#{@@dl}),
- metadata_tid INT4 REFERENCES metadata
+ metadata_tid BIGINT REFERENCES metadata
);
#{@comment.endnotes_plus}
})
@@ -266,7 +266,7 @@ module SiSU_DB_create
} unless @opt.cmd =~/q/
@conn.execute(%{
CREATE TABLE urls (
- metadata_tid INT4 REFERENCES metadata,
+ metadata_tid BIGINT REFERENCES metadata,
plaintext varchar(512),
html_toc varchar(512),
html_doc varchar(512),