Robert Tansley
7160ceb7db
Schema tweaks:
...
Changes from original SQL:
MODIFIED DCValue
from:
CREATE TABLE DCValue
(
dc_value_id INTEGER PRIMARY KEY,
text_value TEXT,
text_lang VARCHAR(24),
source_id INTEGER
);
to:
CREATE TABLE DCValue
(
dc_value_id INTEGER PRIMARY KEY,
item_id INTEGER REFERENCES Item(item_id),
dc_type_id INTEGER REFERENCES DCTypeRegistry(dc_type_id),
text_value TEXT,
text_lang VARCHAR(24),
place INTEGER
source_id INTEGER
);
CREATE INDEX dcvalue_dc_type_id_idx on DCValue(dc_type_id);
REMOVED Item2DCValue
REMOVED Storage
REMOVED Bitstream2Storage
CHANGED Bitstream
from:
-------------------------------------------------------
-- Bitstream table
-------------------------------------------------------
DROP TABLE Bitstream;
CREATE TABLE Bitstream
(
bitstream_id INTEGER PRIMARY KEY,
bitstream_type_id INTEGER REFERENCES BitstreamTypeRegistry(bitstream_type_id),
name VARCHAR(256),
size INTEGER,
checksum VARCHAR(64),
checksum_algorithm VARCHAR(32),
description TEXT,
user_type_description TEXT,
source VARCHAR(256),
deleted BOOL
);
to:
-------------------------------------------------------
-- Bitstream table
-------------------------------------------------------
DROP TABLE Bitstream;
CREATE TABLE Bitstream
(
bitstream_id INTEGER PRIMARY KEY,
bitstream_type_id INTEGER REFERENCES BitstreamTypeRegistry(bitstream_type_id),
name VARCHAR(256),
size INTEGER,
checksum VARCHAR(64),
checksum_algorithm VARCHAR(32),
description TEXT,
user_type_description TEXT,
source VARCHAR(256),
internal_id VARCHAR(256),
deleted BOOL
);
Views:
REMOVED Item2Bitstream
REMOVED Collection2Bitstream
REMOVED Community2Bitstream
REMOVED WorkflowItemsBySubmitter
REMOVED PersonalWorkspaceBySubmitter
REMOVED AllStorage
REMOVED ItemVersion
CHANGED DCResult
from:
-------------------------------------------------------
-- DCResult view
-------------------------------------------------------
DROP VIEW DCResult;
CREATE VIEW DCResult as
SELECT Item.item_id, Item.in_archive, Item.submitter_id, dc_type_id, DCValue.*
FROM Item2DCValue, DCValue, Item
WHERE Item2DCValue.dc_value_id = DCValue.dc_value_id
AND Item.item_id = Item2DCValue.item_id
;
to:
-------------------------------------------------------
-- DCResult view
-------------------------------------------------------
DROP VIEW DCResult;
CREATE VIEW DCResult as
SELECT DCValue.*, Item.in_archive, Item.submitter_id
FROM DCValue, Item
WHERE Item.item_id = DCValue.item_id
;
git-svn-id: http://scm.dspace.org/svn/repo/trunk@15 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-05-16 18:10:04 +00:00