diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-04-26 21:07:14 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-04-26 21:07:20 -0400 |
commit | 361032d47d096c241d562852e71211feb0198b56 (patch) | |
tree | e87de9e19b68e17ee5d1afbc6020a26862454a9e /lib/sisu/v2/db_columns.rb | |
parent | git, start experimenting with an alternative/parallel git based sisu document... (diff) |
metadata, db sql (table structure), adds OCLC number, and; html metadata, renables showing of topic_register
* db (sql) add oclc (Online Computer Library Center) number, affects table
structure, (hence breakage & version bump)
* new db name prefix "sisu_v2c_"; new pgsql db name prefix "SiSUv2c_"
* OCLC == Online Computer Library Center
Diffstat (limited to 'lib/sisu/v2/db_columns.rb')
-rw-r--r-- | lib/sisu/v2/db_columns.rb | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/sisu/v2/db_columns.rb b/lib/sisu/v2/db_columns.rb index 0c2eb367..ba861f4d 100644 --- a/lib/sisu/v2/db_columns.rb +++ b/lib/sisu/v2/db_columns.rb @@ -1425,7 +1425,7 @@ module SiSU_DB_columns end def column_comment %{COMMENT ON COLUMN metadata_and_text.#{name} - IS 'metadata classify document library of congress (if available)';} + IS 'metadata classify document Library of Congress';} end def tuple t=if defined? @md.classify.loc \ @@ -1447,7 +1447,7 @@ module SiSU_DB_columns end def column_comment %{COMMENT ON COLUMN metadata_and_text.#{name} - IS 'metadata classify document dewey (if available)';} + IS 'metadata classify document Dewey';} end def tuple t=if defined? @md.classify.dewey \ @@ -1460,6 +1460,28 @@ module SiSU_DB_columns end self end + def classify_oclc + def name + 'classify_oclc' + end + def create_column + "#{name} VARCHAR(#{Db[:col_classify_library]}) NULL," + end + def column_comment + %{COMMENT ON COLUMN metadata_and_text.#{name} + IS 'metadata classify document Online Computer Library Center number';} + end + def tuple + t=if defined? @md.classify.oclc \ + and @md.classify.oclc=~/\S+/ + txt=@md.classify.oclc + special_character_escape(txt) + ["#{name}, ","'#{txt}', "] + else ['',''] + end + end + self + end def classify_pg def name 'classify_pg' |